Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jb55 on github.
  • I am jb55 (https://keybase.io/jb55) on keybase.
  • I have the public key with fingerprint 7737 A993 ED1E C9FB 601F  1416 6D3E 2004 415A F4A3

To claim this, I am signing this object:

@jb55
jb55 / recursive_tags.md
Created February 26, 2014 23:45
Recursively add Mavericks tags to a folder

1. Install jdberry/tag

brew install tag

2. Run this command

find ~/target_folder -name "*.txt" -exec tag -a tag1 tag2 {} \;
007 James Bond # GB.zip
4 in 1 - Fun Pack 2 # GB.zip
4 in 1 - Fun Pack # GB.zip
Addams Family # GB.zip
Addams Family - Pugsley's Scavenger Hunt # GB.zip
Adventure Island 2 # GB.zip
Adventure Island # GB.zip
Adventures of Lolo # GB.zip
Adventures of Pinocchio # GB.zip
Adventures of Rocky and Bullwinkle # GB.zip
#!/usr/bin/env node
var map = require('map-stream');
var csv = require('csv-parse');
var stringify = require('csv-stringify');
var skip = require('skip-stream');
var queue = require('concurrent-map-stream');
var argv = require('minimist')(process.argv.slice(2));
var debug = require('debug')('soundcloudstats');
var through = require('through');
#!/usr/bin/env node
var map = require('map-stream');
var csv = require('csv-parse');
var stringify = require('csv-stringify');
var queue = require('concurrent-map-stream');
var argv = require('minimist')(process.argv.slice(2));
var concurrency = argv.j || 10;
var cid = process.env.SC_CLIENT_ID;
@jb55
jb55 / email.md
Last active August 29, 2015 13:58
Encrypting your shit guide, a series of tutorials I'm putting together for coworkers

PGP

Everyone here really needs to know about this.

If you were wondering what the pgp thing in my signature is, it's a part of my pgp public key fingerprint. You can use it to retrieve my pgp public key from keyservers. For example,

$ gpg --recv-keys 0x415AF4A3

on the terminal will import my public key. Once you have it you can start sending me encrypted email.

@jb55
jb55 / chain.js
Last active August 29, 2015 14:00
let items = $(obj)
.to(sortBy, function(val, key){ return -val.length; })
.to(iter)
.to(filter, function(x) { return x.length > 1; })
.val
@jb55
jb55 / update_travis.sh
Last active August 29, 2015 14:00
Updating your travis png's to svg's
#!/bin/bash
README_NAME="Readme.md"
find . -name ".travis.yml" -maxdepth 3 -exec dirname {} \; > travis_dirs
find . -name "$README_NAME" -maxdepth 3 -exec sed -i "" "s/\.png/\.svg/" {} \;
for dir in $(<travis_dirs); do
cd $dir
git add "$README_NAME"
git commit -m "travis: png to svg"
git push origin master
@jb55
jb55 / nice.js
Last active August 29, 2015 14:00
quick hack for fast pagination
SoundCloudy.prototype.batch = function(offset, pageSize, n) {
n = n == null? 2 : n;
var self = this;
function* next() {
for (let i of range(n)) {
yield self.run({ offset: offset })
offset += pageSize;
}
}
λ putStrLn $ drawVerticalTree $ Node "a" [Node "b" [Node "c" []], Node "d" []]
a
|
--
/ \
b d
|
c
λ putStrLn $ drawVerticalTree $ join $ duplicate $ Node "a" [Node "b" [Node "c" []], Node "d" []]