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:bfb132b142921da6a4b6
Created June 14, 2015 21:12
isAboutOneDirection.js
function isAboutOneDirection(text){
return !!text.match(/One Direction|1d|Niall|Horan|Liam|Payne|Harry|Styles|Louis|Tomlinson|Zayn|Malik/i)
}
@coleww
coleww / Gemfile
Last active August 29, 2015 14:20
/mtn\ tops
source 'https://rubygems.org'
ruby '2.0.0'
gem 'twitter'
{
"instruments": [
{
"name": "clap",
"type": "drum",
"probs": [
[
"",
"",
"",
@coleww
coleww / gist:c4b20cb35e46fa8d9f61
Last active August 29, 2015 14:13
299 plateaus
{ "href" : "http://en.wikipedia.org/wiki/Altiplano", "title" : "Altiplano", "body" : "The Altiplano (Spanish for \"high plain\"), Andean Plateau or Bolivian Plateau, in west-central South America, where the Andes are at their widest, is the most extensive area of high plateau on Earth outside of Tibet. The bulk of the Altiplano lies within Bolivian and Peruvian territory while its southern parts lie in Chile and Argentina. The Altiplano plateau hosts several cities like Puno, Oruro, Potosí, Cuzco and La Paz, the administrative seat of Bolivia. Northeastern Altiplano is more humid than the Southwestern, the latter of which hosts several salares, or salt flats, due to its aridity. At the Bolivia-Peru border lies Lake Titicaca, the largest lake in South America." }
{ "href" : "http://en.wikipedia.org/wiki/Altiplano_Cundiboyacense", "title" : "Altiplano Cundiboyacense", "body" : "The Altiplano Cundiboyacense is a set of highlands located on the Eastern Cordillera of the Colombian Andes between the departments of
@coleww
coleww / gist:ae1c1bbc0f710c5e49d9
Created December 17, 2014 03:54
hubot-weatherify
# Description:
# Get the weather in different places, with limited emoji representation
#
# Commands:
# hubot weatherify <CITY_NAME> - <CITY_NAME> weather: :umbrella: :foggy: heavy intensity rain & mist
#
# Notes:
# this api claims that it requires a key...but it appears not to...¯\_(ツ)_/¯
#
# Author:
@coleww
coleww / gist:f5a45d681658322c8cb6
Created December 17, 2014 03:53
hubot-12th-street-bart-departures
# Description:
# Bart departures from 12th Street Oakland City Center
#
# Commands:
# hubot bart - Leaving Soon: Fremont=>4 min. Pittsburg/Bay Point=>15 min. Richmond=>9 min. SFO/Millbrae=>4 min.
#
# Notes:
# adapted from hubot-bart, API key is public from http://www.bart.gov/schedules/developers/api
#
# Author:
@coleww
coleww / phish.rb
Created November 23, 2014 18:43
Array#phish(element) inserts the element, oh, just kind of anywhere in the array, you know, whatever.
class Array
def phish element
i = rand self.length
self.insert i, element
end
end
@coleww
coleww / ubus.rb
Created October 11, 2014 14:25
a bunch of links i scraped from ubu.com
ubus = [
{txt: "John Giorno -- Restless: An Interview by Daniel Nester (2002)",
href: "http://www.ubu.com/papers/giorno_nester_interview.html"},
{txt: "Introduction -- Barbara Cole &amp; Lori Emerson",
href: "http://www.ubu.com/papers/kg_ol_intro.html"},
{txt: "Zero Kerning -- Craig Dworkin",
href: "http://www.ubu.com/papers/kg_ol_dworkin.html"},
@coleww
coleww / run this in irb or something
Created October 9, 2014 02:53
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
loop { print (rand < 0.5) ? '\\' : '/' }
alias be="bundle exec "
alias respectful="rspec "
$ be respectful