Skip to content

Instantly share code, notes, and snippets.

privmsg comes in:
parse it
privmsg = {
sender: 'sendername',
direct: true, // if botname: or prefix like !
message: 'whoa message',
};
{
"added": [
".gitignore"
],
"message": "ignorning config files",
"author": {
"email": "=",
"name": "="
},
"url": "https://github.com/aquameta/zenircbot/commit/92a77b38603646863e4588871e4e74be0b0320df",
@wraithan
wraithan / *scratch*
Created August 11, 2011 21:10
chronos ideas
// https://chronos.wraithan.net/new
post = {
timestamp: 'yyyy-mm-ddThh:mm:ss', // http://en.wikipedia.org/wiki/ISO_8601
// 'local time' will be taken to mean Pacific Time
callback: 'https://example.com/', // https required?
data: {
example: 'data to send',
},
api_token: '0450506f2e1ad187e7206712ee32a888fdfda1e9', // acquired from the website ahead of time
# Bindings
unbind-key C-b
set-option -g prefix C-z
bind-key z send-prefix
bind-key C-z last-window
bind r source-file ~/.tmux.conf
bind k confirm-before kill-window
# Settings
set-option -g default-terminal "screen-256color"
#!/bin/bash
function wordlookup {
curl dict://dict.org/d:$1
}
(beehive)[wraithan@wraithbeast beehive]
[git:live] $ cloc apps/
971 text files.
960 unique files.
44 files ignored.
http://cloc.sourceforge.net v 1.53 T=1.0 s (918.0 files/s, 73837.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
def phasing(phaser_attr):
def phaser(f):
@wraps(f)
def wrapper(self, *args, **kwargs):
state = eval("self.%s" % phaser_attr)
if hasattr(f, "phases") and state in f.phases:
return f.phases[state](self, *args, **kwargs)
elif hasattr(f, "phase_points"):
points = [pt for pt in f.phase_points if pt <= state]
if len(points) > 0:
@wraithan
wraithan / zenbot.irc
Created September 5, 2011 02:15
zenbot doing cool shit
19:12:33 Wraithan | ZenWraithBot: service admin
19:12:33 ZenWraithBot | admin online
19:12:43 Wraithan | ZenWraithBot: pull
19:12:43 ZenWraithBot | pulling down new code
19:12:55 Wraithan | ZenWraithBot: restart
19:12:56 ZenWraithBot | brb!
19:12:56 <-- | ZenWraithBot (~Wraithan@c-67-189-110-252.hsd1.or.comcast.net) has quit (Remote host closed the connection)
19:13:11 --> | ZenWraithBot (~Wraithan@c-67-189-110-252.hsd1.or.comcast.net) has joined #pdxbots
19:14:14 Wraithan | ZenWraithBot: service github
19:14:14 ZenWraithBot | restarting github
;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
(load
(expand-file-name "~/.emacs.d/elpa/package.el"))
(package-initialize))
def live():
env.hosts = api_call_that_gives_me_the_urls_to_the_hosts()
def agi_deploy():
command = fab_lib.get_agi_status_for_asterisk_server()
print'running ', command, 'on hosts: ',ast_hostnames_as_tyger
print run(command, True)
"""
fab live agi_deploy