Skip to content

Instantly share code, notes, and snippets.

@marxjohnson
marxjohnson / autohide.css
Created March 7, 2012 09:08
Autohide CSS for Moodle Editing mode, originally from http://moodle.org/mod/forum/discuss.php?d=197470
/** To hide the icons we are using opacity as display:none makes
the buttons inaccessible.
FILTER attributes should apply to IE so long as the strict
doctype is served. Use Filter: none on clear to protect PNG alphas.
Tweak the top value to get "ghost" icons rather than hiding them**/
.block .header .commands a img,
@marxjohnson
marxjohnson / BBR.rb
Created January 7, 2012 14:22
A script to detect and report Boogie Board Rip events on linux via USB
begin
lsusb = `lsusb`
if lsusb.split("\n").select{|l| l.include? "2047:ffe7"}.count == 0
raise "Boogie Board Rip not currently connected"
end
begin
dmesg = `dmesg`
bbdev = dmesg.split("\n").select{|l| l.match "2047:FFE7.*hidraw[0-9]"}.pop.match("(hidraw[0-9]+)").to_s
raise RuntimeError if bbdev.empty?