Skip to content

Instantly share code, notes, and snippets.

View yobennett's full-sized avatar

Bennett yobennett

  • Netflix
  • San Francisco
View GitHub Profile

Keybase proof

I hereby claim:

  • I am yobennett on github.
  • I am yobennett (https://keybase.io/yobennett) on keybase.
  • I have a public key whose fingerprint is 0919 D0FD CF11 9C72 828E 73F2 9F18 255C 8967 6027

To claim this, I am signing this object:

@yobennett
yobennett / Makefile
Last active October 18, 2023 19:53
AF_INET6 with active connection AF_INET4 socket
v4v6:
cc v4v6.c -o v4v6
#!/usr/bin/env bash
# Simple move this file into your Rails `script` folder. Also make sure you `chmod +x puma.sh`.
# Please modify the CONSTANT variables to fit your configurations.
# The script will start with config set by $PUMA_CONFIG_FILE by default
PUMA_CONFIG_FILE=config/puma.rb
PUMA_PID_FILE=tmp/pids/puma.pid
PUMA_SOCKET=tmp/sockets/puma.sock
# A sample Gemfile
source "http://rubygems.org"
gem "redis"
gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git'
gem "em-hiredis"
# gem "em-synchrony"
gem "em-websocket"
# /etc/security/limits.conf
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
===========================================================
# /etc/sysctl.conf
# sysctl for maximum tuning
@yobennett
yobennett / franchise.js
Created May 31, 2012 16:38
Create SecondaryTile in Windows 8 Metro with JavaScript
(function () {
"use strict";
var nav = WinJS.Navigation;
function pin() {
// This demo code comes from
// http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.startscreen.secondarytile.aspx
// Prepare package images for use as the Tile Logo and Small Logo in our tile to be pinned.
# Hot deploy Rails apps (rolling restart) with Capistrano, Haproxy, and cluster of Passengers
# Capistrano config
namespace :passenger do
task :disable_load_balancing, :roles => :app do
run "rm -f #{current_path}/public/http-check.txt"
end
task :enable_load_balancing, :roles => :app do