Skip to content

Instantly share code, notes, and snippets.

View timestep's full-sized avatar
:shipit:
I may be slow to respond.

Kevin timestep

:shipit:
I may be slow to respond.
View GitHub Profile
@timestep
timestep / gist:1844ba04c81329ace100
Last active August 29, 2015 14:03
rbenv install CMDs
cd
RBENV = "~/.rbenv"
echo 'No RBENV. Installing.....'
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
if [ $ZSH_VERSION ]
then
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@timestep
timestep / gist:6874257
Created October 7, 2013 20:19
Sails socket testing also courtesy of xdissent @ #sailsjs
// In Sails app install test dependencies:
// $ npm install mocha supertest sails-memory --save-dev
// Create some tests in `test` folder in the app.
// Run `mocha`
var request = require('supertest'),
assert = require('assert'),
sails = require('sails'),
io = require('sails/node_modules/socket.io/node_modules/socket.io-client');
@timestep
timestep / gist:6874167
Created October 7, 2013 20:14
Sails Mocha Test. courtesy of xdissent from #sailsjs
// In Sails app install test dependencies:
// $ npm install mocha supertest sails-memory --save-dev
// Create some tests in `test` folder in the app.
// Run `mocha`
var request = require('supertest'),
assert = require('assert'),
sails = require('sails');
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},