Skip to content

Instantly share code, notes, and snippets.

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

Jackson Tong jacksontong

🏠
Working from home
View GitHub Profile
@jacksontong
jacksontong / remote.sql
Created September 5, 2015 05:19
grant access permission mysql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
@jacksontong
jacksontong / server.ini
Last active August 26, 2015 17:15
HHVM server.ini for Ubuntu FastCGI
; php options
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
@jacksontong
jacksontong / create_swap.sh
Last active August 26, 2015 12:46 — forked from garystafford/create_swap.sh
From my blog post, Scripting Linux Swap Space: Scripting Linux Swap Space
#!/bin/sh
# size of swapfile in megabytes
swapsize=512
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@jacksontong
jacksontong / install_vagrant_sudoers.sh
Last active August 29, 2015 14:24 — forked from joemaller/install_vagrant_sudoers.sh
Vagrant NFS Shares without a password
#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.