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
/* written by worc, with revisions by merrycakes */ | |
var ZipcodePopover = (function () { | |
var region, fragment, zipcodeMessage, zipcodeInput, countySelect, countyMessage, | |
okButton, target, validControlKeys; | |
fragment = {}; | |
/* I've got this idea to pass in keys we want to filter for or against */ | |
validControlKeys = [8, 37, 39, 13, 27]; |
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
PortalServices['PersonalizationObserverable'] = PortalServices['PersonalizationObserverable'] || { | |
version : '2.0.0', | |
personalization : {}, | |
observers : [], | |
addObserver : function(observer) { | |
this.observers.push(observer) | |
}, | |
removeObserver : function(observer) { | |
var index = this.observers.indexOf(observer); | |
if(index > -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
<?xml version="1.0" encoding="UTF-8"?> | |
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
<resistance> | |
<strength>10</strength> | |
<screen_edge_strength>20</screen_edge_strength> | |
</resistance> | |
<focus> | |
<focusNew>yes</focusNew> | |
<!-- always try to focus new windows when they appear. other rules do | |
apply --> |
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
#!/bin/sh | |
#TODO add a function to parse the regex match out | |
# Get the commit message file and the name of the branch that we're working on. | |
# Also grab the branch description for good measure in case we end up using that later. | |
MESSAGE_FILE=$1 | |
COMMIT_MESSAGE=$(cat $MESSAGE_FILE) | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
BRANCH_DESC=$(git config branch."$BRANCH_NAME".description) |
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
# -u flushes messages to the output, is a workaround to get mintty on windows to display server messages | |
alias pws='python -u -m http.server' |
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
Object.keys(objectsList).map(key => objectsList[key]); | |
Object.keys(objectsList).map(function(key) { | |
objectsList[key]; | |
}); |
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
var superformula = function(phi, a, b, m, n1, n2, n3) { | |
return Math.pow( | |
Math.pow(Math.abs(Math.cos(m * phi / 4) / a, n2)) + Math.pow(Math.abs(Math.sin(m * phi / 4) / b, n3)), | |
-1/n1); | |
} |
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
/** | |
* from stackoverflow: "How to randomize (shuffle) a JavaScriptArray?" | |
* https://stackoverflow.com/q/2450954/769780 | |
* | |
* "The de-facto unbiased shuffle algorithm..." | |
* https://stackoverflow.com/a/2450976/769780 | |
*/ | |
export default (array) => { | |
let currentIndex = array.length, temporaryValue, randomIndex; |
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
const path = require('path'); | |
module.exports = [ | |
{ | |
name: 'local build', | |
entry: path.resolve(__dirname, 'src.babel.js'), | |
target: 'web', | |
output: { | |
path: path.join(__dirname, 'dist/js'), | |
filename: 'dist.js' |
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
import shuffle from './shuffle'; | |
export default function* (list) { | |
let index = 0; | |
shuffle(list); | |
while (list) { | |
if (index >= list.length) { | |
shuffle(list); | |
index = 0; |
OlderNewer