These instructions will explain how to install tensorflow on mac with cuda enabled GPU suport. I assume you know what tensorflow is and why you would want to have a deep learning framework running on your computer.


Make sure to update your homebrew formulas

brew update
View gist:c22150dfffda454fb1e7
I spent hours to get plv8js works on my macbookpro with mavericks osx and this simple gist explain how i did!!
First of all i have already brew and postgresql installed
To install V8 we can use brew but we need to switch version to 3.14.5
and i did in a very raw way!!
cd /usr/local/Library/Formula
vi v8.rb
on my laptop i have this
View gist:2183474

A Capistrano Rails Guide

by Jonathan Rochkind,

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".


Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

View nginx.conf
# Config for Nginx to act as a front-end for Riak
# The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc)
# Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_)
# Config is in /etc/nginx/sites-available/default or somewhere like that
# Set up load-balancing to send requests to all nodes in the Riak cluster
# Replace these IPs/ports with the locations of your Riak nodes
upstream riak_hosts {
View Gemfile-rails-2.3.8.rb
# Everything you need to do to get started with Rails 2.3.8
# As of June 14th, 2010 @ 2:30 p.m. MST
# This gist now features instructions to get Rails 3 up and running with:
# - Ruby 1.8.7-p174
# - Bundler 0.9.26
# - Cucumber 0.8.0
# - Rspec 1.3.0 + Rspec-Rails 1.3.2
# - RVM
View flex service server
require "socket"
PORT = 843
server =
puts "the policy server is start..."
while (session = server.accept)
puts "ye.."
session.puts "<?xml version=\"1.0\"?><cross-domain-policy><allow-access-from domain=\"\" to-ports=\"61613\"/></cross-domain-policy>\000"
View gist:103827
require "rubygems"
require "active_record"
# Connection pool logic works, but the underlying driver
# is still blocking. However, aliasing the query method
# to use mysqlplus produces expected results!
require 'mysqlplus'
class Mysql; alias :query :async_query; end
View quick mysql plus
require "rubygems"
require 'active_record'
require 'mysqlplus'
class Mysql; alias :query :async_query; end
class DBConn < ActiveRecord::Base
:adapter => "mysql",
:database => "test",
:username => "root",
View AR insert quick
require "rubygems"
require 'active_record'
class DBConn < ActiveRecord::Base
:adapter => "mysql",
:database => "test",
:username => "root",
:password => "123",
:host => "localhost"