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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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 | |
# Move this script to RAILS_ROOT/scripts/taskrunner, `chmod +x` it and run with ./script/taskrunner | |
# run one or more rake tasks `Task:> db:migrate app:do_something env_variables=like_this` | |
require 'readline' | |
require 'irb' | |
require './config/environment' | |
load './Rakefile' |
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 bash | |
curl -s "http://ws.audioscrobbler.com/2.0/user/$1/recenttracks.rss?limit=50" | grep -E '^\s+<title>' | sed 's/^[ \t]*<title>//;s/<\/title>[ \t]*$//' |
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
module PluginHelper | |
module ClassMethods | |
attr_accessor :commands | |
def user_commands(*cmds) | |
@commands = cmds | |
end | |
end | |
def self.included(base) | |
base.extend(ClassMethods) |
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
ruby-1.9.2-p180 :019 > CSV.parse("this is some,b0rken \"csv\"") | |
#=> CSV::MalformedCSVError: Illegal quoting on line 1. |
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
flip: (╯°□°)╯︵ ┻━┻ |
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
rvm use 1.8.7 |
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
# Maintainer: Joseph Hsu <[email protected]> | |
pkgname=bdsm-git | |
pkgver=20110418 | |
pkgrel=1 | |
pkgdesc="SM :: S{cripting,ystem,tack} Management (SM) Framework (Core)" | |
arch=('i686' 'x86_64') | |
url="https://sm.beginrescueend.com/" | |
license=("Apache License, Version 2.0") | |
depends=("bash") | |
makedepends=("git") |
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
# mkick.rb | |
# | |
# Mass-kicks users in a channel | |
# | |
# http://scripts.irssi.org/html/mkick.pl.html | |
# | |
# Possible inspiration: http://weechat.org/files/scripts/unofficial/chanlist.rb | |
# | |
# Usage: /mkick <channel> <kick message> |
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 bash | |
git reset --soft HEAD~1 |