git rev-parse --abbrev-ref HEAD
git symbolic-ref --short HEAD #probably works for 1.8 and newer clients
| ### KERNEL TUNING ### | |
| # Increase size of file handles and inode cache | |
| fs.file-max = 2097152 | |
| # Do less swapping | |
| vm.swappiness = 10 | |
| vm.dirty_ratio = 60 | |
| vm.dirty_background_ratio = 2 |
| language: c | |
| env: | |
| global: | |
| - "HOST_IP=$(/sbin/ifconfig venet0:0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}')" | |
| - DOCKER_HOST=tcp://$HOST_IP:2375 | |
| - DOCKER_PORT_RANGE=2400:2500 | |
| - SLIRP_PORTS=$(seq 2375 2500) | |
| before_install: |
| #!/bin/bash | |
| #go inside your node_modules folder and run this script | |
| for module in *; | |
| do | |
| version=$(grep '"version":' $module/package.json | cut -d"\"" -f4); | |
| echo "testing $module-v$version"; | |
| curl "https://nodesecurity.io/validate/$module/$version"; | |
| echo ""; | |
| done |
| #!/bin/bash | |
| #installs https://github.com/muquit/mailsend | |
| #tested on amzn linux | |
| git clone git@github.com:muquit/mailsend.git mailsend | |
| cd mailsend | |
| git checkout 1.17b14 | |
| yum install -y openssl-devel | |
| ./configure --with-openssl=/usr/ | |
| make && make install |
| #!/usr/bin/env node | |
| /* | |
| * Author: Samar Acharya <samar@techgaun.com> | |
| * Place it in .git/hooks and chmod +x .git/hooks/prepare-commit-msg | |
| * Based on http://www.ipreferjim.com/2013/04/git-prepare-commit-msg-with-node-js/ | |
| */ | |
| var exec = require('child_process').exec, | |
| util = require('util'), |
| #!/bin/bash | |
| yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel | |
| wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.20.tar.gz | |
| tar xfz ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.20.tar.gz | |
| cd GraphicsMagick-1.3.20 | |
| ./configure | |
| make | |
| make install |
| virsh setmem guest-name <new-memory-in-KB> |
| tar -xvf file.tar.gz --wildcards --no-anchored "<file_name>" -C /home/samar/path/to/extract/ |