This file contains hidden or 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
(function () { | |
// setup | |
setup() | |
// descriptor | |
return {name: 'wikipedia'} | |
}) | |
function setup () { | |
} |
This file contains hidden or 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
(function() { | |
// setup | |
setup() | |
// descriptor | |
return {name:"airport"} | |
}) | |
var airports // airport data | |
var land_cache = {} | |
var alert_channel = '#pdxbots' |
This file contains hidden or 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
;; WebAssembly WASM AST Hello World! program | |
(module | |
(import "env" "_fwrite" (func $__fwrite (param i32 i32 i32 i32) (result i32))) | |
(import "env" "_stdout" (global $stdoutPtr i32)) | |
(import "env" "memory" (memory 1)) | |
(export "main" (func $main)) | |
(data (i32.const 8) "Hello World!\n") |
This file contains hidden or 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
def go(msg) | |
puts "firstruby go msg: #{msg}" | |
puts "firstruby go msg.params: #{msg['params']}" | |
puts "firstruby go msg.params.channel: #{msg['params']['channel']}" | |
Gluon.bot_say(msg['params']['channel'], "ruby hello") | |
end | |
# must be last | |
{ name: "firstruby" } |
This file contains hidden or 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
(function() { | |
setup() | |
return {name:"todo"} | |
}) | |
var key | |
var actives = [] | |
function setup() { | |
db.get('todo:key', function(value) { key = value; bot.say(bot.admin_channel, "todo key loaded") }) |
This file contains hidden or 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
(function(){ | |
return {name: "emoji"} | |
}) | |
function go(msg) { | |
if(msg.method == "irc.privmsg") { | |
var match = /!emoji\s+(.*)/.exec(msg.params.message) | |
if(match) { | |
var term = match[1] | |
var emoji = emojipedia(term) |
This file contains hidden or 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
(function(){ | |
return {name: "kickstats"} | |
}) | |
var prefix="kickstats:" | |
function go(msg) { | |
if (msg.method == "irc.privmsg") { | |
var cmd_match = /!kickstats(\s+(.*))?$/.exec(msg.params.message) | |
if (cmd_match) { |
This file contains hidden or 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
(function(){ | |
return {name: "wifi"} | |
}) | |
var prefix = "wifi:" | |
function go(msg) { | |
if (msg.method == "irc.privmsg") { | |
var regex = /^!wifi\s+(.*)/ | |
var cmd_match = regex.exec(msg.params.message) |
This file contains hidden or 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
(function(){ | |
return {name: "ecoli"} | |
}) | |
var dbkey = "ecoli" | |
var url = 'https://www.portlandoregon.gov/bes/waterquality/results.cfm?location_id=7132' | |
var state | |
function setup() { | |
db.get(dbkey, function(json) { |
This file contains hidden or 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
(function() { | |
return {name: "flightaware"} | |
}) | |
function go(msg){ | |
if (msg.method == "irc.privmsg") { | |
var match = /^!flight (.*)/.exec(msg.params.message) | |
if(match) { | |
var flightNum = match[1] | |
var data = flight_data(flightNum.toUpperCase()) |