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
// Here’s a 100% deterministic alternative to `Math.random`. Google’s V8 and | |
// Octane benchmark suites use this to ensure predictable results. | |
Math.random = (function() { | |
var seed = 0x2F6E2B1; | |
return function() { | |
// Robert Jenkins’ 32 bit integer hash function | |
seed = ((seed + 0x7ED55D16) + (seed << 12)) & 0xFFFFFFFF; | |
seed = ((seed ^ 0xC761C23C) ^ (seed >>> 19)) & 0xFFFFFFFF; | |
seed = ((seed + 0x165667B1) + (seed << 5)) & 0xFFFFFFFF; |
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
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
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
# Taxonomy terms: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_taxonomy_term-php | |
# Menu links: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_menu_link-php | |
# File items: | |
- https://gist.github.com/facine/35bb291811c146b6fc9e#file-create_file-php | |
# Nodes: |