jq is useful to slice, filter, map and transform structured json data.
brew install jq
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'] = "support@owndomain.at" | |
gitlab_rails['smtp_enable'] = true | |
gitlab_rails['smtp_address'] = "smtp.gmail.com" | |
gitlab_rails['smtp_port'] = 587 | |
gitlab_rails['smtp_user_name'] = "account@owndomain.at" | |
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"
This guide provides detailed steps for setting up DNS records, configuring a DNS tunneling server and client, and setting up a browser for secure proxy connections.
require 'benchmark' | |
require 'mysql2' | |
DB_NAME = 'bench_mroonga' | |
DB_USERNAME = 'username' | |
DB_USERPASS = 'password' | |
TABLE_NAME = 'benches' | |
insert_cols = ['none', 'mysql', 'mroonga'].join(', ') |