Java Regex Cheatsheet
Escaping strings in regex replace s.replaceFirst(Pattern.quote("text to replace"), Matcher.quoteReplacement("replacement text"));
Escaping strings in regex replace s.replaceFirst(Pattern.quote("text to replace"), Matcher.quoteReplacement("replacement text"));
BFG-clean repository If you’ve had the bad habit of checking in binary data, this is your chance to clean it up. If so, then run these lines. Tweak the bfg command to your taste. cd git-repo # Optional. Will likely make you able to remove more files. You might want to remove remotes as well. git tag -d $(git tag -l) cd .. java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 5M --delete-files "*.{class, jar, png, svg, ico, zip}" git-repo cd git-repo git reflog expire --expire=now --all && git gc --prune=now --aggressive Move the repository to a subfolder Replace subfolder below with the real subfolder name...
Links Microservices: Health monitoring
Links 30 Seconds of CSS A Complete Guide to Flexbox
Some collected documentation for building a generic page in Django2 (python3) Python language Python3 libraries Framework Django documentation Django documentation - topics Deployment Django and nginx Django and uWSGI Security in Django Performance and Optimization in Django Deployment checklist Example pairing Django/nginx
Some collected documentation for building an API backend in Rocket (rust) Rust language Rust by Example Framework Rocket Documentation Docker Github Page Libraries Chrono - Time and Date Diesel - ORM
Some collected documentation for developing in luminous. Clojure docs. Language. Luminous web. Framework. Sweet/Compojure API. Luminous building block for API. Compojure. Building block for Sweet. Swagger. Building block for Sweet. Ring. Building block for Compojure. Schema. Data types and validation. Libraries Buddy-hashers. For hashing, mostly passwords. Guides Restful Clojure
# m h dom mon dow command # SQL Backup (daily) 15 1 * * * docker exec -t iixnotes_database_1 pg_dumpall -U postgres | gzip > /media/stor/backup/iix-notes.daily.psql.gz # SQL Backup (weekly) 15 1 * * 0 docker exec -t iixnotes_database_1 pg_dumpall -U postgres | gzip > /media/stor/backup/iix-notes.weekly.psql.gz # SQL Backup (monthly) 15 1 1 * * docker exec -t iixnotes_database_1 pg_dumpall -U postgres | gzip > /media/stor/backup/iix-notes.monthly.psql.gz
Find sequences: \c database_name \ds For each, run: SELECT setval('your_table_id_seq', (SELECT MAX(id) FROM your_table));
Links Awk tutorial Pattern matching (grep) # Should return one line per file ls -a | awk '//' # Should print files starting with a dot ls -a | awk '/^\./' Counting (wc) ls | awk '{i++} END {print i}' # Should return number of files Delete all svn-files with an exclamation mark in svn status svn status | awk '/^!/{print $2}' | xargs svn delete --force Find only the first match and print it echo data | awk "/$pattern/{print;exit}" Ignore the first line echo data | awk 'NR>1' Ignore duplicate lines echo data | awk '!...