Skip to content

Instantly share code, notes, and snippets.

/* valid JSON response */
{"k": "v"}
/* valid JSONP response */
callback({k: "v"})
/**
* This prints out "10" every second
* Update the code to print 0..9
*/
var x;
for (x = 0; x < 10; x++) {
setTimeout(function () {
console.log(x);
@ajcrites
ajcrites / README.md
Last active June 10, 2019 17:38
Minimal AngularJS + AMD (require.js) loading plus `r.js` optimization.

Simple AngularJS + require.js "optimizable" project

NOTE: gists do not allow directories, so / cannot be included in filenames. Instead, - is used in this project. That is to say public-index.html should actually be read as public/index.html relative to the root of the project.

This is a very stripped down seed project for AngularJS-based code that is loaded via the require.js AMD and optimized via r.js

Inspired by:

# create the repository folder locally
~ $ mkdir project
~ $ cd project
# initialize git for this project
~/project $ git init
# create a file so the repository is not empty.
# Otherwise, you can't push it.
# Projects usually have a README associated with them,
var x = require("./x");
exports.x = x;
#!/bin/bash -e
# Create a git feature branch according to Mobiquity standards
if [ -z $1 ]; then
echo -e "\e[0;31mYou must specify the jira number\e[0m"
exit
fi
branch_type=${2:-feature}
current_branch=$(git symbolic-ref -q --short HEAD)
new_branch=$branch_type/$USER/$(date +%y%m%d)-$1
#!/bin/bash -e
#
# Installation of `hub` is required
#
# Create a pull request for the same user with the specified branches
if [ -z $1 ]; then
read -n1 -p "Will use current branch. (Ctrl+c to cancel)"
branch=$(git rev-parse --abbrev-ref HEAD)
else
ssh -tt amazon "sudo ls"
var GitHubApi = require("github"),
git = require("nodegit"),
fs = require("fs");
var github = new GitHubApi({
version: "3.0.0",
debug: true,
protocot: "https",
host: "api.github.com",
// pathPrefix: "/api/v3",
> "" + []
''
> "" - []
0
> "" - {}
NaN