// jQuery
$(document).ready(function() {
// code
})
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const statusCodes = require('http').STATUS_CODES; | |
function createError(code, name) { | |
return function(message) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = name; | |
this.message = message; | |
this.statusCode = code; | |
} |
Drop in replace functions for setTimeout
and setInterval
that make use of requestAnimationFrame
.
See overview article and Paul Irish's earlier post.
Courtesty of Joe Lambert
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
A few examples to peruse after reading Peter Bourgon's awesome tutorial, which walks you through the building of a backend service for a web app.
- another example - a simple web server and client
- writing web apps - go's official tutorial
- recap of request handling - overview of go's request routing and response handling mechanics
Run like so:
node gist-clone-all.js username
You'll want to replace "username" with your own username.
This script clones using the push URL, so you should probably be the owner of the gists. You could also use this to clone someone else's gists, but in that case you may wish to edit the code to use gist_pull_url
instead.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://help.shopify.com/api/guides/authentication/oauth#scopes | |
scopes = [] | |
scopes.append('read_content') | |
scopes.append('write_content') | |
scopes.append('read_themes') | |
scopes.append('write_themes') | |
scopes.append('read_products') | |
scopes.append('write_products') | |
scopes.append('read_customers') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import boto3 | |
import datetime | |
import time | |
ENABLED_REGIONS = [ | |
"us-east-1", | |
"us-west-2", | |
"eu-west-1", | |
"eu-central-1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// # Mocha Guide to Testing | |
// Objective is to explain describe(), it(), and before()/etc hooks | |
// 1. `describe()` is merely for grouping, which you can nest as deep | |
// 2. `it()` is a test case | |
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
// before/after first/each it() or describe(). | |
// | |
// Which means, `before()` is run before first it()/describe() |
NewerOlder