jq is useful to slice, filter, map and transform structured json data.
brew install jq
| FROM ubuntu:trusty | |
| RUN \ | |
| apt-get update \ | |
| && apt-get -y install gettext-base \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| ENV VALUE=foo | |
| ENV VALUE1=boo | |
| COPY config.txt source_config.txt |
| #!/bin/bash | |
| set -e | |
| JAVA_HOME=${1-text} | |
| [ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; } | |
| KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts | |
| wget https://letsencrypt.org/certs/letsencryptauthorityx1.der | |
| wget https://letsencrypt.org/certs/letsencryptauthorityx2.der |
| Disable vim automatic visual mode on mouse select | |
| issue: :set mouse-=a | |
| add to ~/.vimrc: set mouse-=a | |
| my ~/.vimrc for preserving global defaults and only changing one option: | |
| source $VIMRUNTIME/defaults.vim | |
| set mouse-=a |
| {# style 1 - long form #} | |
| {% if filepath == '/var/opt/tomcat_1' %} | |
| {% set tomcat_value = tomcat_1_value %} | |
| {% else %} | |
| {% set tomcat_value = tomcat_2_value %} | |
| {% endif %} | |
| {# style 2 - short form #} | |
| {% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %} |
| curl https://api.github.com/repos/atom/atom/stargazers -H 'Accept: application/vnd.github.v3.star+json' |
| # /etc/gitlab/gitlab.rb | |
| gitlab_rails['gitlab_email_from'] = "[email protected]" | |
| gitlab_rails['smtp_enable'] = true | |
| gitlab_rails['smtp_address'] = "smtp.gmail.com" | |
| gitlab_rails['smtp_port'] = 587 | |
| gitlab_rails['smtp_user_name'] = "[email protected]" | |
| gitlab_rails['smtp_password'] = "NicePassword" | |
| gitlab_rails['smtp_domain'] = "owndomain.at" | |
| gitlab_rails['smtp_authentication'] = :plain |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"