Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Campfire Alerts
// @description Issues sound alerts for messages addressed to the user
// @match https://*.campfirenow.com/room/*
// @author João Britto
// @grant none
// ==/UserScript==
function init(chat, Campfire, Class, escapeRegExp) {
Campfire.PersonalMessageHandler = Class.create({
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
operators = ["+", "-", ""]
operations = numbers.size - 1
expressions = operators.repeated_permutation(operations).map do |sequence|
numbers.zip(sequence).join
end
p "Exploring #{expressions.size} possibilities."
@britto
britto / compact-reader.css
Created November 1, 2011 01:02
Google Reader Tweaks
#top-bar {
height: 40px;
}
#search {
padding: 5px 0;
}
#logo {
margin: -12px 0 0 44px;
@britto
britto / Expand Participants List.user.js
Last active September 25, 2015 02:37
Expand Participants List
// ==UserScript==
// @name Expand Participants List
// @description Removes scrolling from Campfire's participants list
// @match https://*.campfirenow.com/room/*
// @author Britto
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle("\
div#Sidebar ul.participant-list { height: auto; } \