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
// Changes XML to JSON | |
// fixed some bugs from http://davidwalsh.name/convert-xml-json | |
// October 9, 2012 | |
// Brian Hurlow | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
// console.log(xml.nodeType, xml.nodeName ); |
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/bash | |
SERVICE=" | |
[Unit] | |
Description=Docker Application Container Engine | |
Documentation=https://docs.docker.com | |
After=network.target docker.socket | |
Requires=docker.socket | |
[Service] |
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
function chan(n) { | |
let internalQueue = [] | |
let drain = null | |
async function* wrappedIterator() { | |
while (true) { | |
if (internalQueue.length) { | |
if (drain) drain() | |
yield internalQueue.shift() | |
} |
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 stream = require('stream'); | |
class Transformer extends stream.Transform { | |
constructor(options) { | |
super({ | |
readableObjectMode : true, | |
writableObjectMode: true | |
}); | |
} |
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/bash | |
###################### | |
# mafix 0.2 # | |
# fud 2009/07/15 # | |
###################### | |
BASEDIR=`pwd` | |
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin | |
BLK='[1;30m' | |
MAG='[1;35m' |
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
### Keybase proof | |
I hereby claim: | |
* I am bhurlow on github. | |
* I am bhurlow (https://keybase.io/bhurlow) on keybase. | |
* I have a public key ASCpmfCmKZXpos21zxXdNiafraKs12mdiVC-PZEAJDWUnQo | |
To claim this, I am signing this object: |
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 data = [ | |
10, | |
32, | |
59, | |
21, | |
66, | |
32, | |
12, | |
92, |
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
alias ga 'git add' | |
alias gaa 'git add .' | |
alias gaaa 'git add -A' | |
alias gb 'git branch' | |
alias gbd 'git branch -d ' | |
alias gc 'git commit' | |
alias gcm 'git commit -m' | |
alias gco 'git checkout' | |
alias gcob 'git checkout -b' | |
alias gcom 'git checkout master' |
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/bash | |
filename=$(basename "$1") | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
ffmpeg -i $filename.$extension -codec:a libmp3lame $filename.mp3 |
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
(ns scraper.concurrent | |
(:import [java.util.concurrent | |
ExecutorService | |
ExecutorCompletionService | |
Executors | |
CompletionService Future])) | |
(defn prln [& more] | |
(.write | |
*out* |