Skip to content

Instantly share code, notes, and snippets.

@bsy
bsy / gist:8153872
Created December 27, 2013 23:03
show . files in Finder Mac OSX
defaults write com.apple.finder AppleShowAllFiles -bool YES
killall Finder
@bsy
bsy / gist:8153880
Created December 27, 2013 23:05 — forked from trcarden/gist:3295935
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@bsy
bsy / gist:8964541
Last active August 29, 2015 13:56
boot2docker port forwarding
# Add to your .bash_profile
function dfwd {
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$1,tcp,127.0.0.1,$1,,$1"
}
function ddfwd {
VBoxManage modifyvm "boot2docker-vm" --natpf1 delete "tcp-port$1"
}
@bsy
bsy / newrelic_resque_agent.conf
Created February 12, 2014 21:11
Monit config to monitor newrelic_resque_agent without a PID file
check process newrelic_resque_agent
matching "newrelic_resque_agent"
start program = "/usr/bin/ruby /usr/bin/newrelic_resque_agent run"
stop program = "/usr/bin/killall newrelic_resque_agent"
if cpu usage > 95% for 10 cycles then restart
@bsy
bsy / gist:9069685
Created February 18, 2014 12:04
fix for nokogiri libxml2 issue on mavericks
gem install nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local
@bsy
bsy / gist:d4379adeb7b0837bd6a2
Created July 11, 2014 00:18
Obtain GPU card info
<script>
var canvas = document.createElement('canvas');
canvas.setAttribute("id", "gltestcanvas");
gl = null;
try {
// Try to grab the standard context. If it fails, fallback to experimental.
gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
}
catch(e) {
console.warn(e);
@bsy
bsy / gist:22ec3090b2123a4579bf
Created July 25, 2014 20:09
Record Android Screen (requires Kiti Kat 4.4)
adb shell screenrecord --bit-rate 8000000 --time-limit 30 /sdcard/kitkat.mp4
@bsy
bsy / gist:1ab2a23d0c42329dbaa8
Created December 8, 2014 21:57
Clear out stale resque workers
Resque.workers.each {|w| matches = w.id.match(/^[^:]*:([0-9]*):[^:]*$/); pid = matches[1]; w.unregister_worker unless w.worker_pids.include?(pid.to_s)}
# What we do
Vouch is solving this multi-trillion dollar consumer finance challenge by creating technology and services for consumers to help each other permanently climb up the credit ladder and get control over their own financial freedom.
Our first product – a fixed-term consumer lending platform – is aimed at giving low-FICO consumers a path to building or fixing your credit. Credit is the first and most important step to getting a leg up in life, but it’s also an area where some established players have done more harm than good to their customers.
At Vouch, we’re building a way for your friends and family to help direct your trustworthiness – creating a socially-focused way to look at lending. We help customers build a network of trusted friends and family – people who would vouch for them in times of need by creating a way of looking at creditworthiness that spans beyond your FICO score because we understand you are more than your credit score.
# What you’d do
As a product designer, you would be res
@bsy
bsy / gist:aa63f4ec21bada6b5ac7
Created August 3, 2015 22:19
Install Docker on OSX
# Install Vagrant
https://www.vagrantup.com/downloads
# Install Docker CLI
http://bit.ly/docker_1_7
# Docker Machine
curl -L https://github.com/docker/machine/releases/download/v0.3.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
chmod +x /usr/local/bin/docker-machine