Table of Contents generated with DocToc
This file contains hidden or 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
# Search and replace filenames in the current directory | |
# | |
# Example: | |
# tile-000.png | |
# tile-001.png | |
# tile-002.png | |
# | |
# becomes | |
# sprite-000.png | |
# sprite-001.png |
This file contains hidden or 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
console.reset = function () { | |
return process.stdout.write('\033c'); | |
} |
This file contains hidden or 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
# check if job exists | |
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
# with folder plugin | |
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# without folder plugin | |
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# create folder |
This file contains hidden or 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
const bus = {}; | |
const get = e => (bus[e] = bus[e] || new Set()); | |
export const listeners = new Proxy(bus, { get }); | |
export const emit = (e, ...args) => listeners[e].forEach(fn => fn(...args)); |
This file contains hidden or 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
class SimpleSequencer { | |
/* SimpleSequencer essentially combines the following tutorials and wraps them in es6 | |
* | |
* https://github.com/kylestetz/Web-Audio-Basics/tree/gh-pages/4-Continuous-Sequencing | |
* https://www.html5rocks.com/en/tutorials/audio/scheduling/ | |
* http://clockworkchilli.com/blog/3_html5_drum_machine_with_web_audio | |
* | |
* | |
* Usage: |
This file contains hidden or 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
var BASE64_MARKER = ';base64,'; | |
function convertDataURIToBinary(dataURI) { | |
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length; | |
var base64 = dataURI.substring(base64Index); | |
var raw = window.atob(base64); | |
var rawLength = raw.length; | |
var array = new Uint8Array(new ArrayBuffer(rawLength)); | |
for(i = 0; i < rawLength; i++) { |
This file contains hidden or 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'; | |
/* To test: | |
* echo -n <input> | nc localhost 1337 | |
* | |
* Results are <input>:<nonce> | |
* | |
* Passing e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e should get back | |
* e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e:2c8 | |
*/ |
This file contains hidden or 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
/* Simple PRNG Based on https://en.wikipedia.org/wiki/Middle-square_method#Middle_Square_Weyl_Sequence_RNG | |
* | |
* Usage: | |
* node: | |
* var MSWS = require('msws.js'); | |
* | |
* browser: | |
* include this script in your html document | |
* | |
* both: |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
</head> | |
<body> | |
<h1>Get Unity Packages as JSON</h1> | |
<p>Retrieves basic information about your Unity Asset Store assets in JSON format.</p> |