Skip to content

Instantly share code, notes, and snippets.

Avatar

Don Park donpdonp

View GitHub Profile
View tip.js
function(payload){
var key = 'tips'
if(payload.type == "emessage"){
var keyword = /^\s*(\S+)\+\+\s*$/
var match = keyword.exec(payload.message)
if(match){
tip(payload.target, match[1])
}
}
@donpdonp
donpdonp / meters.json
Created Apr 4, 2014
Portland Parking Meters geojson
View meters.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@donpdonp
donpdonp / gist:11193179
Created Apr 22, 2014
android batt overheat
View gist:11193179
E/ThermalEngine( 194): TM Id 'battery_LCD_monitor' Sensor 'batt_therm' - alarm raised 3 at 350.0 degC
E/ThermalEngine( 194): override action 5000
E/ThermalEngine( 194): Thermal-Server: Thermal received msg override 5000
E/ThermalEngine( 194): override_notify : SS mode 1 override 5000
E/ThermalEngine( 194): enable_threshold: tsens_tz_sensor3 (/sys/devices/virtual/thermal/thermal_zone3/trip_point_0_type)
E/ThermalEngine( 194): enable_threshold: tsens_tz_sensor3 (/sys/devices/virtual/thermal/thermal_zone3/trip_point_1_type)
AndroSense says batt at 91F
View gist:11305154
function (payload) {
if(payload.type == "emessage") {
var weather = /\!weather/
var match = weather.exec(payload.message)
if(match) {
if(Math.random() > 0.7) {
return payload.nick+": you got a window? open it."
}
}
}
@donpdonp
donpdonp / marvel.js
Last active Aug 29, 2015
marvel comics
View marvel.js
function (payload) {
if(payload.type == "emessage") {
var marvel = /marvel (.*)/
var match = marvel.exec(payload.message)
if(match) {
var terms = match[1]
var results = search(terms)
return results
}
}
@donpdonp
donpdonp / bitbucket.js
Last active Aug 29, 2015
neuronbot bitbucket
View bitbucket.js
function(msg) {
var override = false;
if(/^bitbucket$/.test(msg.message)) {
override = true;
}
if(override || (msg.type == "ticktock" && (new Date(Date.parse(msg.message))).getMinutes() % 10 == 0) ) {
var bitbucket_json = http.get("http://status.bitbucket.org/?format=json")
var bitbucket = JSON.parse(bitbucket_json)
var key = 'bitbucket:status'
@donpdonp
donpdonp / legiscan.js
Last active Aug 29, 2015
neuronbot legiscan
View legiscan.js
function(payload){
var override = false;
if(payload.type == "emessage"){
if(/^legiscan$/.test(payload.message)) {
override = true;
}
}
if(payload.type == "ticktock"){
var time = new Date(Date.parse(payload.message))
@donpdonp
donpdonp / citycouncil.js
Last active Aug 29, 2015
neuronbot city council agenda
View citycouncil.js
function(payload){
var override = false;
if(payload.type == "emessage"){
if(/^citycouncil$/.test(payload.message)) {
override = true;
}
}
if(payload.type == "ticktock"){
var time = new Date(Date.parse(payload.message))
View pedalpaloozaparser.rb
#!/usr/bin/env ruby
require 'bundler/setup'
require 'nokogiri'
require 'open-uri'
require 'json'
require 'time'
url = 'http://www.shift2bikes.org/cal/viewpp2014.php'
doc = Nokogiri::HTML(open(url).read)
@donpdonp
donpdonp / kickstarter.js
Last active Aug 29, 2015
neuronbot kickstarter
View kickstarter.js
function(payload){
var go = false;
var project = null;
if(payload.type == "emessage"){
var match = /^kickstarter\s+(.*)$/.exec(payload.message);
if(match) {
project = match[1]
go = true;
}
}
You can’t perform that action at this time.