This file contains hidden or 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
| trap("INT") do | |
| puts | |
| puts "Rocklobster!" | |
| exit 1 | |
| end | |
| heads = [ | |
| "o.O", | |
| "O.o", | |
| "O.O", |
This file contains hidden or 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
| scriptencoding utf-8 | |
| nmap <Leader>i :%!xsltlint<CR> | |
| set nocompatible | |
| highlight Normal guifg=Black guibg=#ffefd5 | |
| filetype plugin indent on | |
| autocmd FileType perl setlocal softtabstop=2 shiftwidth=2 | |
| autocmd FileType ruby setlocal softtabstop=2 shiftwidth=2 |
This file contains hidden or 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 | |
| def list dir | |
| return [File.expand_path dir] unless File.directory? dir | |
| output = `svn list #{dir}` | |
| files = [] | |
| output.split("\n").each do |f| | |
| file = File.join(dir, f) |
This file contains hidden or 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 Slug | |
| module InstanceMethods | |
| def before_create | |
| self.slug = create_slug name.dup | |
| super | |
| end | |
| def before_update | |
| self.slug = create_slug name.dup | |
| super |
This file contains hidden or 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
| require 'cinch' | |
| require 'curl' | |
| require 'uri' | |
| require 'RMagick' | |
| module Cinch | |
| module Plugins | |
| module Coxify | |
| class ImageBot | |
| include Cinch::Plugin |
This file contains hidden or 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 | |
| require 'find' | |
| files = [] | |
| rars = [] | |
| Find.find(ARGS.last) do |f| | |
| rar = File.expand_path(f).dup | |
| rar.gsub! /r\d{2}$/i, "rar" |
This file contains hidden or 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
| netfeed@serenity: 1.8.7> gem --version | |
| 1.3.7 | |
| netfeed@serenity: 1.8.7> ruby -rubygems /tmp/test.rb | |
| Aftonbladet: Sveriges nyhetskälla och mötesplats | |
| Aftonbladet: Sveriges nyhetskälla och mötesplats |
This file contains hidden or 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 -w | |
| # simple script to count row changes in a svn repo | |
| def status dir='' | |
| files = [] | |
| svn = `svn status #{dir}` | |
| svn.split("\n").each do |line| | |
| next if line =~ /^[^A-Z]/ | |
| line =~ /^[A-Z]\s+.*\s+(.+)$/ |
NewerOlder