This file contains 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
#!/usr/bin/env ruby | |
# Sometimes, you realize you have really rubbish songs in your library for some reason. | |
# This script allows you to get rid of them just by hitting ./mpd-delete-current-song.rb on your command line. | |
# It will backup the file to TRASH, then remove it from MPD's library and finally skip to next song. | |
# https://gist.github.com/1341895 | |
require 'socket' | |
require 'fileutils' |
This file contains 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
class CheckOut | |
def initialize(rules) | |
@items = Hash.new { 0 } | |
@pricer = Pricer.new(rules) | |
end | |
def scan(sku) | |
@items[sku] += 1 | |
end |
This file contains 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
#!/bin/bash | |
# A little Bash script to make a mirror of your Github repositories and keep | |
# them up-to-date. | |
# Why mirroring? Because I can! | |
# Also, it will be very useful if one day a meteorite crashes into Github | |
# servers (even if it will not happen). | |
# https://gist.github.com/950441 |
NewerOlder