Skip to content

Instantly share code, notes, and snippets.

View cu12's full-sized avatar
🏠
Working from home

Domonkos Czinke cu12

🏠
Working from home
View GitHub Profile
@cu12
cu12 / gist:9fbdc4ebe4d998df44a1
Last active February 11, 2016 10:15
Dokku dockerfile trace
+ parse_args git-receive-pack ''\''samson'\'''
+ for arg in '"$@"'
+ case "$arg" in
+ for arg in '"$@"'
+ case "$arg" in
+ return 0
+ args=("$@")
+ [[ git-receive-pack =~ ^--.* ]]
+ has_tty
++ /usr/bin/tty
Required local modifications are in the following pull request: https://github.com/cu12/samson/pull/1
dokku apps:create samson
docker pull mysql:5.6
export MYSQL_IMAGE_VERSION="5.6"
dokku mysql:create samson
dokku mysql:link samson samson
dokku config:set samson GITHUB_TOKEN=<token> \
GOOGLE_CLIENT_ID=<clientid> \
GOOGLE_CLIENT_SECRET=<client_secret> \
@cu12
cu12 / overriding.md
Last active September 22, 2016 09:04
Overriding PHP memory_limit in Travis

I was wondering why Travis is still using the default 1G memory limit while I was trying to override it.

The problem is that PHP loads custom ini files in alphabetical order, so travis.ini was loading after my memory.ini, overriding whatever I had there regarding memory_limit.

So the solution would be to prepend your custom ini files with a letter after t.

.travis.yml

before_install:
 - phpenv config-add ci/x_apcu.ini
@cu12
cu12 / lolcommit.md
Last active November 30, 2016 13:42
brew install imagemagick ffmpeg
sudo gem install lolcommits

Go to the repo where you'd like to install the hook

lolcommits --enable --delay=2 --animate=4 --fork
lolcommits --plugin slack --config
#!/bin/sh
while /bin/true; do
echo "$(date) $0 run started"
LVS_DATA=$(lvs --reportformat json)
# lvm_lv_size_bytes
echo '# HELP lvm_lv_size_bytes Size of logical volume in bytes.' > /monit/lvm_lv_size_bytes.prom
echo '# TYPE lvm_lv_size_bytes gauge' >> /monit/lvm_lv_size_bytes.prom
echo "$LVS_DATA" \
| jq -r --compact-output '.report[].lv[] | "lvm_lv_size_bytes{lv_name=\"\(.lv_name)\",vg_name=\"\(.vg_name)\",pool_lv=\"\(.pool_lv)\"}" + " " + (.lv_size | ascii_upcase)' \