ensure that Profile -> Terminal -> Terminal may report title is checked
Then add the following to .zshrc
# set iterm title
iterm_title() {
echo -ne "\e]1;$1\a"
}
ensure that Profile -> Terminal -> Terminal may report title is checked
Then add the following to .zshrc
# set iterm title
iterm_title() {
echo -ne "\e]1;$1\a"
}
Helpers for automatic retrying of sketchy processes. Linear delay or exponential backoff. by @wellcaffeinated
Demo at: https://jsfiddle.net/gh/gist/library/pure/df1dc4bea62688c8f372d2b76b189d32
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Redirect to wellcaffeinated.net</title> | |
<meta http-equiv = "refresh" content = "1; url = https://wellcaffeinated.net" /> | |
</head> | |
<body> | |
<p>Please visit: <a href="https://wellcaffeinated.net">https://wellcaffeinated.net</a></p> | |
</body> | |
</html> |
const elCache = new Map() | |
// This helps fix the annoying disappearing of dom elements on csb save. | |
// Use $() or $$() to retrieve your dom elements in loops | |
const createQuerySelectorUtil = (qs) => (query) => { | |
let el = elCache.get(query) | |
if (el && document.body.contains(el)) { | |
return el | |
} | |
el = qs(query) | |
elCache.set(query, el) |
const Rx = require( 'rxjs/Rx' ); | |
// This took me way too long to figure out. Hope this helps someone. | |
// <3 Well Caffeinated | |
function fromCursor( cursor ){ | |
return new Rx.Observable((obs) => { | |
// is the connection closed | |
var closed = false | |
// get the next document |
{ | |
"source": "51", | |
"orderid": "5a7b92a6a28ee8467bc2dd2b", | |
"status": "canceled", | |
"miscfields": { | |
"25": "Piper", | |
"26": "Wendy", | |
"51": "[email protected]" | |
}, | |
"tickets": [ |
Physics.renderer('pixi', 'canvas', function( parent ){ | |
return { | |
init: function( options ){ | |
// create an new instance of a pixi stage | |
this.stage = new PIXI.Stage(0xffffff); | |
// create a renderer instance. | |
this.renderer = PIXI.autoDetectRenderer(options.width, options.height); | |
// If you want to subscribe to collision pairs | |
// emit an event for each collision pair | |
world.subscribe('collisions:detected', function( data ){ | |
var c; | |
for (var i = 0, l = data.collisions.length; i < l; i++){ | |
c = data.collisions[ i ]; | |
world.publish({ | |
topic: 'collision-pair', | |
bodyA: c.bodyA, | |
bodyB: c.bodyB |
// VERY crude approximation to a gaussian random number.. but fast | |
var gauss = function gauss( mean, stddev ){ | |
var r = 2 * (Math.random() + Math.random() + Math.random()) - 3; | |
return r * stddev + mean; | |
}; |
!function(){ | |
var orderOfOps = ['+', '-', '*', '/']; | |
var rules = { | |
'+' : 'add', | |
'-' : 'subtract', | |
'*' : 'multiply', | |
'/' : 'divide' | |
}; |