This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ mvn clean install -DskipTests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Step 0. (Optional) Tell VIM to show whitespace: | |
| :set list | |
| # Step 1. Tell VIM what the the current tabsize is: | |
| :set tabstop=4 # Tab size is 4 spaces | |
| # Step 2. Convert spaces to real tabs: | |
| :set noexpandtab # Use real tab instead of space | |
| :retab! # Replace all space-tabs with real tabs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| USER=XXX | |
| HOST=XXX | |
| LOCAL_PATH=$(pwd) | |
| REMOTE_PATH=docker/apache2/html | |
| cat > /tmp/rsync-include.txt <<EOF | |
| */ | |
| *.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @AllArgsConstructor | |
| public class Animal { | |
| private int age; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Map<String, String> caseInsensitiveMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| addons: | |
| ssh_known_hosts: <deploy-host> | |
| before_deploy: | |
| - openssl aes-256-cbc -K $encrypted_<...>_key -iv $encrypted_<...>_iv -in deploy_rsa.enc -out /tmp/deploy_rsa -d | |
| - eval "$(ssh-agent -s)" | |
| - chmod 600 /tmp/deploy_rsa | |
| - ssh-add /tmp/deploy_rsa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ docker container run -i db psql postgres -U postgres <<EOF | |
| CREATE TABLE employee (id INTEGER PRIMARY KEY, name VARCHAR); | |
| INSERT INTO employee VALUES (1, 'Miguel'); | |
| INSERT INTO employee VALUES (2, 'Javier'); | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Lowercase all html tags | |
| $ ex - '+%s,<\(.*\)>,<\L\1>,' -cwq index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ docker image inspect -f 'CMD {{.Config.Cmd}}, ENTRYPOINT {{.Config.Entrypoint}}' postgres:9.4 | |
| CMD [postgres], ENTRYPOINT [docker-entrypoint.sh] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo -en "Directory ~/bin already exists, overwrite it? [Y/n]: " | |
| read -n 1 action; echo | |
| case "$action" in | |
| '') ;& | |
| [Yy]) rm -rf ~/bin;; | |
| *) echo "Skipping directory ~/bin";; | |
| esac |