This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
httpProxy = require('http-proxy'); | |
// | |
// Create an instance of node-http-proxy | |
// | |
var proxy = new httpProxy.HttpProxy({ | |
target: { | |
host: 'localhost', | |
port: 8124 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script will output dumps for all databases using seperate files | |
# Derived from this post: http://www.cyberciti.biz/faq/ubuntu-linux-mysql-nas-ftp-backup-script/ | |
USER="root" | |
PASSWORD="SnM1073k" | |
HOST="localhost" | |
MYSQL="$(which mysql)" | |
MYSQLDUMP="$(which mysqldump)" | |
OUTPUT_DIR="/backups/files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# * * * * * command to be executed | |
# - - - - - | |
# | | | | | | |
# | | | | +- - - - day of week (0 - 6) (Sunday=0) | |
# | | | +- - - - - month (1 - 12) | |
# | | +- - - - - - day of month (1 - 31) | |
# | +- - - - - - - hour (0 - 23) | |
# +- - - - - - - - minute (0 - 59) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# www to non-www redirect -- duplicate content is BAD: | |
# https://github.com/h5bp/html5-boilerplate/blob/5370479476dceae7cc3ea105946536d6bc0ee468/.htaccess#L362 | |
# Choose between www and non-www, listen on the *wrong* one and redirect to | |
# the right one -- http://wiki.nginx.org/Pitfalls#Server_Name | |
#server { | |
# don't forget to tell on which port this server listens | |
# listen 80; | |
# listen on the www host | |
# server_name www.example.com; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file and a complete list of statements and | |
## options, please have a look in the Monit manual. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shinkansen:rs-api justinschier$ localtunnel -k ~/.ssh/id_rsa.pub 3000 | |
This localtunnel service is brought to you by Twilio. | |
Port 3000 is now publicly accessible from http://4nhi.localtunnel.com ... | |
^CShinkansen:rs-api justinschier$ localtunnel -k ~/.ssh/id_rsa.pub 3000 | |
[Error] Unable to register tunnel. Perhaps service is down? | |
Shinkansen:rs-api justinschier$ localtunnel -k ~/.ssh/id_rsa.pub 3000 | |
[Error] Unable to register tunnel. Perhaps service is down? | |
Shinkansen:rs-api justinschier$ date | |
Mon Feb 18 15:33:41 EST 2013 | |
Shinkansen:rs-api justinschier$ localtunnel -k ~/.ssh/id_rsa.pub 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= simple_form_for @product, :html => { :class => 'form-horizontal' } do |f| %> | |
<fieldset> | |
<legend><%= controller.action_name.capitalize %> Product</legend> | |
<%= f.input :name %> | |
<%= f.input :price %> | |
<div class="form-actions"> | |
<%= f.submit nil, :class => 'btn btn-primary' %> | |
<%= link_to 'Cancel', products_path, :class => 'btn' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/bnoguchi/mongoose-auth/blob/master/index.js | |
var everyauth = require('everyauth'); | |
everyauth.everymodule.configurable({ | |
'User': 'A function that returns the mongoose User model (not Schema).' | |
}); | |
var Modules = { | |
everymodule: require('./lib/modules/everymodule') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:false, undef:true, curly:true, node:true, indent:4, maxerr:50, white:false, laxcomma:true, supernew:false */ | |
/*global mongoose */ | |
/*global io */ | |
/*global req */ | |
/*global res */ | |
/*global JSONRES */ | |
var express = require('express') | |
, conf = require('./conf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
starting step - getRequestToken | |
...finished step | |
starting step - storeRequestToken | |
...finished step | |
starting step - redirectToProviderAuth | |
...finished step | |
starting step - extractTokenAndVerifier | |
...finished step | |
starting step - getSession | |
...finished step |