Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<fuppes_config version="0.7.2.3">
<shared_objects>
<!--<dir>/mnt/music</dir>-->
<!--<itunes>/Users/.../iTunes.xml</itunes>-->
<dir>/home/mmb/media</dir>
<dir>/home/mmb/music</dir>
</shared_objects>
<network>
<!--empty = automatic detection-->
#!/usr/bin/ruby
# Apache log browser
require 'resolv'
line_re = %r{(.*?) (.*?) (.*?) \[(.*?) ([+-]\d{4})\] "(.*?) HTTP/[\d\.]+" (.*?) (.*?) "(.*?)" "(.*?)"}
ignore_ips = %w{
}
@mmb
mmb / notify.py_skip_buffers_patch
Created May 17, 2010 03:04
patch to weechat notify.py script to allow skipping notifications for buffers by name
--- notify.py.orig 2010-05-18 19:45:52.000000000 -0400
+++ notify.py 2010-05-18 19:44:47.000000000 -0400
@@ -29,6 +29,7 @@
"icon" : "/usr/share/pixmaps/weechat.xpm",
"urgency" : "normal",
"smart_notification" : "off",
+ "skip_buffers" : "", # comma-separated list of buffers not to notify for
}
# Init everything
@mmb
mmb / pianobar_event_libnotify.rb
Created May 16, 2010 05:16
pianobar event script to create a libnotify notification when a song starts
#!/usr/bin/ruby
# pianobar event script to create a libnotify notification when a song starts
# Copyright (c) 2010
# Matthew M. Boedicker <matthewm@boedicker.org>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@mmb
mmb / pianobar_recent_json.rb
Created April 29, 2010 01:49
pianobar event script to maintain a JSON file of the last 10 songs played
#!/usr/bin/ruby
# pianobar event script to maintain a JSON file of the last 10 songs played
# Copyright (c) 2010
# Matthew M. Boedicker <matthewm@boedicker.org>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@mmb
mmb / pianobar_event.rb
Created April 17, 2010 04:05
pianobar event script to make rbot send currently playing song to an IRC channel
#!/usr/bin/ruby
# pianobar event script to make rbot send currently playing song to an IRC
# channel
# Copyright (c) 2010
# Matthew M. Boedicker <matthewm@boedicker.org>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@mmb
mmb / upslog.rb
Created December 2, 2009 00:49
parse and log diagnostic information from an APC UPS
#!/usr/bin/ruby
# parse and log diagnostic information from an APC UPS
require 'pp'
require 'time'
time_fields = %w{
APC
DATE
@mmb
mmb / lifemagick.rb
Created October 25, 2009 03:48
add methods to rmagick to generate Conway's life iterations
require 'rubygems'
require 'RMagick'
# add methods to rmagick to generate Conway's life iterations
module Magick
class Image
def occupied?(x, y); pixel_color(x, y).to_color == 'black' end
@mmb
mmb / facebook_news.rb
Created October 4, 2009 23:35
fetch a user's facebook news feed
#!/usr/bin/ruby
# fetch a user's facebook news feed
require 'rubygems'
require 'httparty'
require 'digest/md5'
require 'pp'
@mmb
mmb / next_tab.js
Created September 11, 2009 04:22
mozrepl function to select the next tab with title matching a regex
// mozrepl function to select the next tab with title matching a regex
function next_tab(title_re) {
var tabContainer = window.getBrowser().tabContainer;
var tabs = tabContainer.childNodes;
var numTabs = tabs.length;
var startIndex = tabContainer.selectedIndex;
var testIndex;
for (i = 0; i < numTabs - 1; i++) {