Skip to content

Instantly share code, notes, and snippets.

View chrisabrams's full-sized avatar

Chris Abrams chrisabrams

  • Austin, TX
View GitHub Profile
@chrisabrams
chrisabrams / Nginx Proxy Pass
Created February 16, 2014 07:08
Simple reminder of how to proxy pass
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:4040/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision :shell, :path => "bootstrap.sh"
Vagrant.configure("2") do |config|
config.vm.box = "projects"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
#vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
#vb.customize ["modifyvm", :id, "--rtcuseutc", "on"]
end
@chrisabrams
chrisabrams / Host stuff
Last active December 30, 2015 07:09
Vagrant Stuff
vagrant plugin install --plugin-source https://rubygems.org --plugin-prerelease vagrant-vbguest
[
{
"date": {
"created": Mon Aug 19 2013 20:42:31 GMT+00:00 ,
"updated": Mon Aug 19 2013 20:42:31 GMT+00:00
} ,
"desc": "" ,
"id": "5d37f3ea-c212-42e6-9a9d-cebfcdd97956" ,
"meta": {
"ext": "stl" ,
@chrisabrams
chrisabrams / route.coffee
Created August 8, 2013 20:08
Something in this file causes Node.js to hang..trying to figure out what.
_ = require 'underscore'
Backbone = require 'backbone'
Chaplin = require 'chaplin'
Controller = Chaplin.Controller
module.exports = class DualRoute
# Borrow the static extend method from Backbone.
@extend = Backbone.Model.extend
# Taken from Backbone.Router.
@chrisabrams
chrisabrams / test.coffee
Last active December 20, 2015 19:09
Write console.logs from your app/tests running in Mocha to a file.
fs = require 'fs'
util = require "util"
log = fs.createWriteStream(process.cwd() + "/test/stdout.log")
console.log = console.info = (t) ->
out = undefined
if t and ~t.indexOf("%")
out = util.format.apply(util, arguments)
process.stdout.write out + "\n"
return
else
$ = jQuery
queues = {}
running = false
queue = (name) ->
name = 'default' if name is true
queues[name] or= []
next = (name) ->
abrams-3:christie-mockup abrams$ jitsu deploy
info: Welcome to Nodejitsu chrisabrams
info: jitsu v0.11.3, node v0.8.18
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node server.js
info: Creating snapshot 0.1.0-1
info Uploading: [========================== ] 89%error: Error running command deploy
error: ETIMEDOUT
error: Error: ETIMEDOUT