Skip to content

Instantly share code, notes, and snippets.

View ryanwild's full-sized avatar
🏴‍☠️
From the darkest soil grows the whitest lilly

Ryan Wild ryanwild

🏴‍☠️
From the darkest soil grows the whitest lilly
View GitHub Profile
@ryanwild
ryanwild / App.js
Created April 6, 2017 12:46 — forked from tomatau/App.js
SSR React Router Redux Suggestion
import { Switch, Route } from 'react-router'
import { replace } from 'react-router-redux'
@connect(null, { replace })
class PrivateRoute extends React.Component {
componentWillMount() {
this.props.replace('/foo')
}
render() {
@ryanwild
ryanwild / gist:31605fc4383f27249ceeb5c1dd24fac4
Created February 2, 2017 08:15 — forked from yoitsro/gist:8693021
Node + Restify + Passport + Sessions + WebSockets
var restify = require('restify');
// Authentication
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
var sessions = require("client-sessions");
var server = restify.createServer();
server.use(restify.queryParser());
server.use(restify.bodyParser());
@ryanwild
ryanwild / loop.sh
Last active November 10, 2015 07:50
Bash Examples
#!/bin/bash
VALUES="value1","value2"
(IFS=,
for v in $VALUES; do
echo "$v"
done
)