Skip to content

Instantly share code, notes, and snippets.

View thanad's full-sized avatar

Thanad Pansing thanad

  • King Power Click
  • Bangkok
  • X @thanad
View GitHub Profile
@thanad
thanad / increase_swap.sh
Created January 19, 2016 11:03 — forked from shovon/increase_swap.sh
Increasing swap size. Only tested on the ubuntu/trusty64 Vagrant box. CREDIT GOES TO ---> http://jeqo.github.io/blog/devops/vagrant-quickstart/
#!/bin/sh
# size of swapfile in megabytes
swapsize=8000
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@thanad
thanad / portforwarding.md
Last active December 14, 2015 10:05 — forked from kujohn/portforwarding.md
Port forwarding in Mavericks

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@thanad
thanad / subscriptions.skema
Last active October 14, 2015 07:54
the description for this gist
[{"name":"subscriptions_capturing_transaction","color":"Red","position":{"x":115,"y":87},"increment":false,"timestamp":false,"softdelete":false,"column":[{"name":"id","type":"increments","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c133","order":0},{"name":"uid","type":"integer","length":"11","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c133","order":1},{"name":"plan","type":"integer","length":"10","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c133","order":2},{"name":"ticket","type":"string","length":"100","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"gu
require 'formula'
class FlashPlayer < Formula
url 'http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa_debug.app.zip'
md5 '2770acd6997bfd5016dd51acfb20c025'
homepage 'http://adobe.com'
version '11.1'
def install
name = 'Flash Player Debugger.app'
@thanad
thanad / l.php
Created July 15, 2013 08:02 — forked from adriengibrat/l.php
<?php spl_autoload_register(function($c){@include preg_replace('#\\\|_(?!.+\\\)#','/',$c).'.php';});
{
"title": "Tweets Search",
"rows": [
{
"title": "Options",
"height": "50px",
"editable": true,
"collapse": false,
"collapsable": true,
"panels": [
// History.js It!
// v1.0.1 - 30 September, 2012
// https://gist.github.com/854622
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
$ = window.jQuery,
document = window.document;
var LINE = require('./line.js');
var line = new LINE();
var email = 'your email';
var password = 'your password';
line.login(email, password, function(error, result) {
if (error) {
return;
}
@thanad
thanad / resque.conf
Created December 13, 2012 15:14
initctl + resque + rvm
description "my App resque workers"
setuid gitlab
setgid gitlab
start on (net-device-up and local-filesystems)
stop on runlevel [016]
respawn
respawn limit 2 3600
chdir /home/gitlab
exec /home/gitlab/resque.sh >> /home/gitlab/resque.log 2>&1
@thanad
thanad / README.md
Created December 12, 2012 07:47 — forked from mbostock/.block

This example shows how to use the d3.hexbin plugin for hexagonal binning. 2,000 random points with a normal distribution are binned into hexagons; color encodes the number of points that fall into each bin. You can also use area encoding. Inspired by earlier work by Zachary Forest Johnson.