Skip to content

Instantly share code, notes, and snippets.

@jehoshua02
jehoshua02 / reflux_is_simple.md
Created April 7, 2015 19:11
Simple breakdown of how Reflux works.
@jehoshua02
jehoshua02 / index.html
Created March 27, 2015 19:30
DDM Menu Prototype // source http://jsbin.com/dapupo/1
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" />
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
@jehoshua02
jehoshua02 / index.html
Created March 27, 2015 19:29
DDM Menu Prototype // source http://jsbin.com/dapupo
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" />
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
@jehoshua02
jehoshua02 / after.js
Created March 20, 2015 21:29
Do something after some condition is true ...
var after = function after(check, action, interval, limit) {
interval = interval || 0;
limit = limit === undefined ? 10 : limit;
if (check()) {
action();
} else if (limit > 1) {
setTimeout(function () {
after(check, action, interval, --limit);
}, interval);
}
@jehoshua02
jehoshua02 / yeoman-generators-for-react.md
Last active August 29, 2015 14:16
Yeoman generators related to "react" or "webpack" or "flux".
@jehoshua02
jehoshua02 / randomHymn.js
Last active August 29, 2015 14:16
Random Hymn picker script for Tampermonkey or Greasemonkey browser extension. Works for Hymns and Children's Songbook.
// ==UserScript==
// @name randomHymn.js
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author You
// @match https://www.lds.org/music/library/hymns*
// @match https://www.lds.org/music/library/childrens-songbook*
// @grant none
// ==/UserScript==
@jehoshua02
jehoshua02 / .bash_prompt.sh
Created February 12, 2015 22:15
My bash prompt ... blegh.
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
@jehoshua02
jehoshua02 / do_not_use_sudo.sh
Last active August 29, 2015 14:15
Don't use sudo.
alias sudo='echo -e "\033[0;31mThe \"sudo\" command is only for those who know what they are doing. If you know what you are doing, use \"asroot\" instead of \"sudo\".\033[0m"'
alias asroot='`which sudo`'
@jehoshua02
jehoshua02 / front-end_coding_standards.md
Last active August 29, 2015 14:14
Ideas for front-end coding standards.

Ideas for Front-end Coding Standards

Package Managers

Use flags with command line tools to record dependencies in tracked files:

  • package.json (npm)

Jim,

You gotta make sure the limit for the second loop is the starting point plus the length of your name.

/*jshint multistr:true */

var text = "Hey, how are you \
doing? My name is Joshua Stoutenburg.";
var myName = 'Joshua Stoutenburg';