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
--[[ old style ]] | |
-- init.lua | |
env.mj = { } | |
env.mj.doThing = function(sp) | |
print("did " .. op .. "on env" .. env.name) | |
end | |
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
. | |
|~~ | |
|~~ | |
/L\ | |
,.---./LLL\. _.--. | |
.'(|~~`/LLLLL\` ) )`., | |
.(` |~~/LLLLLLL\ ) )-. . | |
( ( /L\/LLLLLLLLL\ ) ) `|~~ |
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
/b_,dM\__,_ | |
_/MMMMMMMMMMMm, ----- | |
_YMMMMMMMMMMMM( ( I'm ) | |
`MMMMMM/ / \ ( a ) | |
MMM| __ / __/ ( wot ) | |
YMM/_/# \__/# \ / ----- | |
(. \__/ \__/ | |
) _, | | |
_____/\ _ / | |
\ `._____,' |
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
# Generates commands to track days since an event | |
# | |
# it's been <number> days since <event> - Set the day when the event happened | |
# <event> on <date> - Set the date the event happened (yyyy-mm-dd) | |
# how long since <event>? - Display the number of days since the event | |
# when was/is/did <event>? | |
module.exports = (robot) -> | |
robot.respond /(.*?) on ((19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01]))$/, (msg) -> | |
event = msg.match[1] |
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
App.Views.About ||= {} | |
class App.Views.About.BaseView extends App.Views.Base.BaseView | |
initialize: () -> | |
if @model | |
@model.bind('reset', @render) | |
@render() | |
render: => |
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
serializeForm: ($el) -> | |
return _.reduce($el.serializeArray(), (memo, v) -> | |
if v.name.match(/\[\]/) | |
v.name = v.name.replace(/\[\]/,'') | |
memo[v.name] ?= [] | |
memo[v.name].push(v.value) | |
else | |
memo[v.name] = v.value | |
memo | |
, {}); |
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
# Description: | |
# "Travis CI alert hook" | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# POST /hubot/travis [data] | |
# | |
# Authors: |
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
class ScoreKeeper | |
constructor: (@robot) -> | |
@cache = { scoreLog: {}, scores: {} } | |
@robot.brain.on 'loaded', => | |
@robot.brain.data.scoreLog ||= {} | |
@robot.brain.data.scores ||= {} | |
@cache.scores = @robot.brain.data.scores || {} | |
@cache.scoreLog = @robot.brain.data.scoreLog || {} |
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
# Description | |
# Searches Yelp API to find you things. | |
# | |
# Dependencies: | |
# "yelp": "0.1.1" | |
# | |
# Configuration: | |
# HUBOT_YELP_CONSUMER_KEY=key | |
# HUBOT_YELP_CONSUMER_SECRET=secret | |
# HUBOT_YELP_TOKEN=token |
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
# Description | |
# Searches Yelp API to find you things. | |
# | |
# Dependencies: | |
# "yelp": "0.1.1" | |
# | |
# Configuration: | |
# HUBOT_YELP_CONSUMER_KEY=key | |
# HUBOT_YELP_CONSUMER_SECRET=secret | |
# HUBOT_YELP_TOKEN=token |
OlderNewer