Skip to content

Instantly share code, notes, and snippets.

View benjaminws's full-sized avatar

Benjamin W. Smith benjaminws

View GitHub Profile
@joelbyler
joelbyler / javascript-editor-tab
Last active December 12, 2015 02:38
JavaScript Notepad Bookmarklet
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/twilight");e.getSession().setMode("ace/mode/javascript");</script>
@hh
hh / ec2_user_data_windows.file
Created October 23, 2012 23:15
ec2 user data file
<script>
cmd /c winrm quickconfig -q > c:\winrm1.log
cmd /c winrm quickconfig -transport:http > c:\winrm2.log
cmd /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"} > c:\winrm3.log
cmd /c winrm set winrm/config/service @{AllowUnencrypted="true"} > c:\winrm4.log
cmd /c winrm set winrm/config/service/auth @{Basic="true"} > c:\winrm5.log
cmd /c netsh advfirewall firewall set rule group="remote administration" new enable=yes > c:\winrm6.log
cmd /c netsh advfirewall firewall set rule group="network discovery" new enable=yes > c:\winrm7.log
cmd /c net user Administrator Opscode2012
</script>
@jallspaw
jallspaw / gist:2041431
Created March 15, 2012 02:46
Things that don't go away
- Metrics collection
- PaaS/IaaS evaluation/investigation
- Automation (auto-build, auto-recovery)
- Fault tolerance
- Availability
- Monitoring
- Performance
- Capex and Opex forecasting
- Outage response
@jpfuentes2
jpfuentes2 / rbenv-install-system-wide.sh
Created March 8, 2012 19:47
CentOS: rbenv install and system wide install
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
@ulfmagnetics
ulfmagnetics / joyent-smartos.erb
Created February 6, 2012 18:42 — forked from benjaminws/joyent-smartos.erb
joyent-smartos.erb
# shove this in ~/.chef/bootstrap/joyent-smartos.erb
# run knife bootstrap <hostname> -d joyent-smartos
bash -c '
if [ ! -f /opt/local/bin/chef-client ]; then
cd /tmp
pkgin -y install gcc-compiler gcc-runtime gcc-tools-0 ruby19 scmgit-base scmgit-docs gmake
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar -xzf rubygems-1.8.10.tgz
cd rubygems-1.8.10
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@kennethreitz
kennethreitz / ab.txt
Created January 16, 2012 19:42
gunicorn + gevent
root@jenkins:~# ab -k -n 10000 -c 300 http://kennethreitz.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking kennethreitz.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
@zh
zh / rbenv-install-system-wide.sh
Created December 15, 2011 07:21
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@jespada
jespada / sssh
Created December 7, 2011 20:08
little function that create a screen session on the remote host
# usage: sssh remotehost
# place it on your .bashrc
function sssh {
HOST=$1
SSH="/usr/bin/ssh"
echo "screen session on remote host $1 , press Ctrl+A d to dettach"
$SSH -t $HOST screen -xRR
}
@zspencer
zspencer / coding_the_distance.txt
Last active September 28, 2015 12:38
coding the distance.txt
Reluctantly crouched at the command line
keyboards clicking and clacking in time
the green bar flashes, the vim pops up
churning, and burning, they yearn for server up
they deftly maneuver and regex to rename
fingers flying fast keyboards in flame
reckless and wild, they commit and they push
their prowess is potent though they sit on their tush.
as they speed through the release, the deploy goes out
they all get up and pour themselves stout