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 / 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 / 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
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')
@drefined
drefined / content-length-size.md
Created July 19, 2016 17:37 — forked from voronianski/content-length-size.md
What happens if you serve content with a different length than the Content-Length header?

@jakearchibald done a bit of research around this:

###Loading a page with Content-Length < actual content length

  • Chrome: Truncated content - no indication of error
  • Firefox: Truncated content - no indication of error
  • Safari: Truncated content - no indication of error
  • IE: Truncated content - no indication of error

###Loading a page with Content-Length > actual content length

@drefined
drefined / appserver.nginx.conf
Created September 9, 2016 05:38
Basic Nginx Gateway / App setup. DO NOT SIMPLY COPY PASTE WITHOUT UNDERSTANDING THE CONTENTS.
server {
# Listen on internal ports only. Do not expose this server directly.
listen 127.0.0.1:80;
listen 10.0.0.1:80; # Secure internal IP
# Hosts
server_name www.wieni.be;
# Root
@drefined
drefined / haproxy.cfg
Created September 9, 2016 06:37 — forked from ryzy/haproxy.cfg
HAProxy conf with SSL termination and HTTP/2 support
global
#debug
chroot /var/lib/haproxy
user haproxy
group haproxy
pidfile /var/run/haproxy.pid
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
@drefined
drefined / vhost.conf
Created September 9, 2016 06:37 — forked from ryzy/vhost.conf
Nginx with HTTP/2 support (and behind HAProxy with HTTP/2)
server {
listen 80 default_server;
listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support
listen 443 default_server ssl http2;
ssl_certificate /etc/ssl/dummy.crt;
ssl_certificate_key /etc/ssl/dummy.key;
root /data/www/default;
index index.html;