Skip to content

Instantly share code, notes, and snippets.

View drefined's full-sized avatar

David Phruksukarn drefined

  • San Diego, CA
View GitHub Profile
@drefined
drefined / app.php
Created July 8, 2012 21:08
This is the simple silex app.
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Silex\Application;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$app = new Silex\Application();
@drefined
drefined / flash_player.rb
Created September 25, 2012 19:28 — forked from ransom4real/flash_player.rb
FlexSDK Homebrew formula. Installs mxmlc and other tools.
require 'formula'
class FlashPlayer < Formula
url 'http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa_debug.app.zip'
md5 '78b69fd614fd661529f50bd4f06c4dee'
homepage 'http://adobe.com'
version '11.1'
def install
name = 'Flash Player Debugger.app'
@drefined
drefined / Ab.rb
Created October 12, 2012 23:06
apache benchmark fix for lion
require 'formula'
class Ab < Formula
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html'
url 'http://www.apache.org/dist/httpd/httpd-2.4.3.tar.bz2'
sha1 '0ef1281bb758add937efe61c345287be2f27f662'
def patches
{
# The ab tool of the latest stable httpd (2.4.2) does not work
@drefined
drefined / bootstrap.py
Last active August 29, 2015 13:57
Bootstrap Instance with etcd
#!/usr/bin/env python
import base64
import etcd
import os
if __name__ == "__main__":
etcd_deploy_key = os.getenv('ETCD_DEPLOY_KEY', '/ssh/private/_deploy')
etcd_gateway_key = os.getenv('ETCD_GATEWAY_KEY', '/ssh/public/gateway')
@drefined
drefined / haproxy.cfg
Last active August 29, 2015 14:08 — forked from GABeech/haproxy.cfg
# This is an example of the Stack Exchange Tier 1 HAProxy config
# The only things that have been changed from what we are running are:
# 1. User names have been removed
# 2. All Passwords have been remove
# 3. IPs have been changed to use the example/documentation ranges
# 4. Rate limit numbers have been changed to randome numbers, don't read into them
userlist stats-auth
group admin users $admin_user
user $admin_user insecure-password $some_password
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
vmbox = "precise64"
vmboxurl = "http://files.vagrantup.com/precise64.box"
gluster_repo = "http://download.gluster.org/pub/gluster/glusterfs/LATEST/Ubuntu/12.04/glusterfs_3.3.0-1_amd64.deb"
gluster_file = "glusterfs_3.3.0-1_amd64.deb"
@drefined
drefined / nginx.conf
Last active August 29, 2015 14:08 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
#!/usr/bin/env bash
brew install php55 --with-thread-safety --without-snmp
brew install php55-mcrypt
brew install php55-xdebug
brew info php55
chmod -R ug+w /usr/local/Cellar/php55/5.5.19/lib/php
pear config-set php_ini /usr/local/etc/php/5.5/php.ini
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"detect_slow_plugins": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')