start new:
tmux
start new with session name:
tmux new -s myname
| # 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 |
| console.reset = function () { | |
| return process.stdout.write('\033c'); | |
| } |
| # 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 |
| 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)); |
| 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: |
| 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++) { |
Table of Contents generated with DocToc
| 'use strict'; | |
| /* To test: | |
| * echo -n <input> | nc localhost 1337 | |
| * | |
| * Results are <input>:<nonce> | |
| * | |
| * Passing e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e should get back | |
| * e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e:2c8 | |
| */ |
| /* 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: |