Skip to content

Instantly share code, notes, and snippets.

🦄
React'ing.

Robert Moggach robmoggach

🦄
React'ing.
Block or report user

Report or block robmoggach

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robmoggach
robmoggach / PersonController.js
Created Jan 31, 2014
waterline issue with null foreign keys
View PersonController.js
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);
});
View macosx-ipnat
$ sudo sysctl -w net.inet.ip.forwarding=1
$ sudo natd -interface en1
$ sudo ipfw add divert natd ip from any to any via en1
@robmoggach
robmoggach / randomPassword.sh
Created Oct 11, 2014
Random Password Generator
View randomPassword.sh
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"
@robmoggach
robmoggach / colors.import.less
Created Dec 5, 2014
Combo of Flat UI and BootFlat Colors
View colors.import.less
// 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;
@robmoggach
robmoggach / shotlinker.sh
Created Feb 7, 2015
Flame Project Shot Linker
View shotlinker.sh
#! /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!
@robmoggach
robmoggach / index.html
Created Mar 4, 2015
Famous App BackSwapper View Famo.us 0.3.4 // source http://jsbin.com/notika
View index.html
<!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" />
@robmoggach
robmoggach / index.html
Created Mar 4, 2015
Famous App Chaining Modifiers in Famo.us 0.3.1 // source http://jsbin.com/rudufu/1
View index.html
<!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" />
@robmoggach
robmoggach / index.html
Created Mar 4, 2015
Famous App Transitionable Size Famo.us 0.3.5 // source http://jsbin.com/ruboju
View index.html
<!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" />
@robmoggach
robmoggach / index.html
Created Mar 4, 2015
Famous App Stacking Famo.us Surfaces 0.3.0 // source http://jsbin.com/xobeje
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Stacking Famo.us Surfaces 0.3.0" />
<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" />
@robmoggach
robmoggach / index.html
Created Mar 4, 2015
Famous App z-translate a Gridlayout in Famo.us 0.3.4 // source http://jsbin.com/solabu
View index.html
<!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" />
You can’t perform that action at this time.