Skip to content

Instantly share code, notes, and snippets.

View coleww's full-sized avatar

Cole Willsea coleww

  • (=^.^=)
  • Berkeley, CA
View GitHub Profile
@coleww
coleww / gist:a7d6ac968e3a8c353dd2
Created August 16, 2015 15:41
SPICE UP YR CLI
https://github.com/maxogden/cool-ascii-faces
https://github.com/melaniecebula/cat-ascii-faces
https://github.com/coleww/cat-me
https://www.npmjs.com/package/figlet
@coleww
coleww / botgle-board.js
Last active August 29, 2015 14:26
the botgle beat
var Twit = require('twit')
var T = new Twit({
consumer_key: 'blaahhh'
, consumer_secret: 'monsters'
, access_token: 'tyrannosaurus'
, access_token_secret: 'awful'
})
var shuffle = require('shuffle-array')
var options = { screen_name: 'botgle',
@coleww
coleww / gist:870d22d05ad57633b635
Created July 28, 2015 04:03
108 one word tweets that i found in like maybe an hour of letting "statuses/sample" run
Goodnight
back
CRISH
BOOFED
Hungry
affss
test294
yonkers
Squadd
Honestly
@coleww
coleww / MPK-mini-midi.clj
Created July 27, 2015 01:24
MPK-mini midi map for overtone
(def mpk (midi-find-connected-device "MPK"))
(on-event (conj (midi-mk-full-device-key mpk) :control-change)
(fn [e]
(let [note (:note e)
vel (:velocity e)]
;; the pads! bank/#.
;; pads 1/5-1/8 overlap with the default piano octave. awesome.
(cond
@coleww
coleww / freesound-id-scraper.js
Last active May 14, 2021 22:23
overtone/freesound get ids for samples
// `npm install --save request cheerio`
var request = require("request")
var cheerio = require("cheerio")
function getSampleIDs(query, min, max){
var url = "https://www.freesound.org/search/?q="+query+"&f=duration%3A%5B"+(min || 0)+"+TO+"+(max || 1)+"%5D&s=duration+asc&advanced=1&a_tag=1&a_filename=1&a_description=1&g="
request(url, function (error, response, html) {
if (!error && response.statusCode == 200) {
var $ = cheerio.load(html);
CUZ I DONE THIS 2x ALREADY
http://clojure-doc.org/articles/tutorials/emacs.html just the install not the config
https://github.com/overtone/emacs-live#easy-install install emacs-live instead
http://stackoverflow.com/a/25900375 do this to fix paredit slurping in iterm2
... ?
@coleww
coleww / gist:213de22a1ab6139467af
Created July 16, 2015 15:10
make braveclojure.com readable
$('#top-nav').remove()
@coleww
coleww / gist:7d2c30606b02b7cf96b6
Created July 12, 2015 00:24
web audio modules on NPM

Each "instrument"/module is an object filled with already-connected and setup audioNodes.

A very simple instrument might look like this:

{
  oscillator: OscillatorNode,
  filter: BiquadFilterNode,
  gain: GainNode
}
@coleww
coleww / gist:845fb5a0ffad5b3f8807
Created June 26, 2015 17:59
block promoted tweets
// people who promote tweets tend to be the absolute worst.
$('.js-action-profile-promoted').each(function(i, val){
$(this).click()
$('.user-dropdown-icon').click()
$('.block-text.not-blocked').click()
$($('.block-button')[0]).click()
});
@coleww
coleww / just-leaving-this-here.js
Created June 15, 2015 20:05
scrape top 100 lyrics
var request = require('request')
var cheerio = require('cheerio')
var fs = require('fs')
var pages = []
request('http://lyrics.wikia.com/LyricWiki:Top_100', function (error, response, html) {
if (!error && response.statusCode == 200) {
var $ = cheerio.load(html);
//handle the 'page not found' page?