Skip to content

Instantly share code, notes, and snippets.

View rjmoggach's full-sized avatar
🦄
React'ing.

Robert Moggach rjmoggach

🦄
React'ing.
View GitHub Profile
@rjmoggach
rjmoggach / PersonController.js
Created January 31, 2014 23:59
waterline issue with null foreign keys
index: function(req, res) {
Person
.find()
.populate('user')
.exec(function peopleFound(err, people) {
console.log(err);
if (err) return res.json(err, 400);
if (!people) return res.json({ error: 'No people exist.' }, 404);
res.json(people);
});
$ sudo sysctl -w net.inet.ip.forwarding=1
$ sudo natd -interface en1
$ sudo ipfw add divert natd ip from any to any via en1
@rjmoggach
rjmoggach / randomPassword.sh
Created October 11, 2014 21:44
Random Password Generator
function random_pass {
CHARACTER_ARRAY=("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "+" "-" "." "@" "%")
RANGE=67
COUNTER=1
while [ $COUNTER -lt 16 ]; do
row[$COUNTER]=$RANDOM
let "row[$COUNTER] %= $RANGE"
while [ ${row[$COUNTER]} = 0 ]; do
row[$COUNTER]=$RANDOM
let "row[$COUNTER] %= $RANGE"
@rjmoggach
rjmoggach / colors.import.less
Created December 5, 2014 05:10
Combo of Flat UI and BootFlat Colors
// Flat UI Colors
@turquoise: #1abc9c;
@green-sea: #16a085;
@emerald: #2ecc71;
@nephritis: #27ae60;
@peter-river: #3498db;
@belize-hole: #2980b9;
@amethyst: #9b59b6;
@wisteria: #8e44ad;
@wet-asphalt: #34495e;
@rjmoggach
rjmoggach / shotlinker.sh
Created February 7, 2015 21:01
Flame Project Shot Linker
#! /usr/bin/env bash
#
# SHOT LINKER
# create links in a flame project to storage server paths
# Note: we only create them local to the flame project to avoid
# dumb backups of symlinks creating duplicated data - with this in mind
# the script assumes the project is local to the flame - know what you're backing up
# archiving a project's setups may also archive all the paths linked to if you're not careful!
@rjmoggach
rjmoggach / index.html
Created March 4, 2015 08:02
Famous App Chaining Modifiers in Famo.us 0.3.1 // source http://jsbin.com/rudufu/1
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Chaining Modifiers in Famo.us 0.3.1" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@rjmoggach
rjmoggach / index.html
Created March 4, 2015 08:02
Famous App Transitionable Size Famo.us 0.3.5 // source http://jsbin.com/ruboju
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Transitionable Size Famo.us 0.3.5" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@rjmoggach
rjmoggach / index.html
Created March 4, 2015 08:24
Famous App z-translate a Gridlayout in Famo.us 0.3.4 // source http://jsbin.com/solabu
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="z-translate a Gridlayout in Famo.us 0.3.4" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@rjmoggach
rjmoggach / index.html
Created March 4, 2015 08:31
famo.us App Tree Famo.us 0.3.1 global-seed // source http://jsbin.com/fobaxo/1
<!DOCTYPE HTML>
<html>
<head>
<title>famo.us App</title>
<meta name="description" content="Tree Famo.us 0.3.1 global-seed" />
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
@rjmoggach
rjmoggach / index.html
Created March 4, 2015 08:34
Famous App BackSwapper View Famo.us 0.3.4 // source http://jsbin.com/notika
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="BackSwapper View Famo.us 0.3.4" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />