Skip to content

Instantly share code, notes, and snippets.

View chinthakagodawita's full-sized avatar

Chin Godawita chinthakagodawita

View GitHub Profile
@chinthakagodawita
chinthakagodawita / profile
Last active August 29, 2015 14:24 — forked from garthk/profile
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1

Keybase proof

I hereby claim:

  • I am chinthakagodawita on github.
  • I am torpy (https://keybase.io/torpy) on keybase.
  • I have a public key whose fingerprint is F10D A51A F2F8 DB03 1838 54D2 D1F5 F672 6F9B 27CD

To claim this, I am signing this object:

Setting a wifi card to monitor mode

This is required before libtins/libpcap will get packets:

DEVICE=wlan0
sudo ifconfig $DEVICE down
sudo iwconfig $DEVICE mode monitor
sudo ifconfig $DEVICE up
@chinthakagodawita
chinthakagodawita / default.vcl
Last active January 3, 2016 13:09
Nginx config for a Drupal installation with Varnish.
# Demonz default Varnish config.
#
# Modified from:
# https://fourkitchens.atlassian.net/wiki/display/TECH/Configure+Varnish+3+for+Drupal+7
#
# Default backend definition. Set this to point to your content
# server.
backend default {
.host = "MYSERVER";
.port = "80";
require 'rubygems'
require 'redis'
class RedisTrie
TERMINAL = '+'
def initialize(prefix)
@prefix = prefix
@r = Redis.new
end
Warning: Your Xcode (4.5) is outdated
Please install Xcode 4.6.
==> Downloading http://curl.haxx.se/download/curl-7.28.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/curl-ca-bundle-1.87.tar.gz
==> perl mk-ca-bundle.pl
Use of uninitialized value in gmtime at mk-ca-bundle.pl line 89.
Couldn't open certdata.txt: No such file or directory at mk-ca-bundle.pl line 128.
Downloading 'certdata.txt' ...
Processing 'certdata.txt' ...
# PHP-FPM configuration
<IfModule mod_fastcgi.c>
Alias /php5.fastcgi /var/lib/apache2/fastcgi/php5.fastcgi
AddHandler php-script .php
FastCGIExternalServer /var/lib/apache2/fastcgi/php5.fastcgi -socket /var/run/php-fpm-apache2.sock -idle-timeout 610
Action php-script /php5.fastcgi virtual
# Forbid access to the fastcgi handler.
<Directory /var/lib/apache2/fastcgi>
<Files php5.fastcgi>