Skip to content

Instantly share code, notes, and snippets.

View kenvunz's full-sized avatar

Ken Vu kenvunz

View GitHub Profile
{
"appendix": {
"airlines": [
{
"active": true,
"fs": "NZ",
"iata": "NZ",
"icao": "ANZ",
"name": "Air New Zealand",
"phoneNumber": "1-800-262-1234"
@kenvunz
kenvunz / bottlejs.d.ts
Last active February 29, 2016 23:01
typings for bottlejs lib
declare module "bottlejs/main" {
class Bottle {
static pop: (name?: string) => Bottle
static config: Object;
public container: Bottle.IContainer;
constructor(name?: string);
/**
@kenvunz
kenvunz / www.conf
Last active August 29, 2015 13:57
/etc/php5/fpm/pool.d/www.conf
; pool name ('www' here)
[www]
; Unix user/group of processes
user = www-data
group = www-data
; The address on which to accept FastCGI requests.
listen = 127.0.0.1:9000
@kenvunz
kenvunz / default
Last active August 29, 2015 13:57
/etc/nginx/sites-available/default
server {
listen 80;
server_name slingshot.co.nz;
root /var/www/vhosts/slingshot.co.nz/public
location /
{
index index.php index.html index.htm;
# update app dependecies
php composer.phar update --profile
# cleaning up cache, and optimize Laravel classes
php artisan cache:clear
php artisan optimize
# run unit test
php phpunit.phar -c phpunit.xml
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@kenvunz
kenvunz / abc_region.php
Created October 17, 2010 22:18
Controller and model
<?php
class Abc_Region extends Db_ActiveRecord
{
public $table_name = 'abc_regions';
public $has_many = array(
'countries'=>array('class_name'=>'Shop_Country', 'foreign_key'=>'abc_region_id')
);
public function define_columns($context = null)
{