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 'rubygems' | |
require 'fileutils' | |
series = {} | |
Dir['/home/xbmc/series/*'].each do |dirname| | |
series["^#{File.basename(dirname).downcase}.*"] = dirname | |
end |
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 'rubygems' | |
require 'fileutils' | |
require 'eventmachine' | |
trap("INT") do | |
EM.stop | |
end |
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
" Vim global plugin for creating files from templates | |
" Last Change: 15/06/2011 | |
" Maintainer: Edson César <[email protected]> | |
" License: This file is placed in the public domain. | |
function! s:Skel(template, filename) | |
if !empty(fnamemodify(a:filename, ":e")) | |
let l:fn = a:filename | |
else | |
let l:fn = a:filename . "." . fnamemodify(a:template, ":e") |
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
SELECT level n, TO_DATE('1/1/' || '2012','DD/MM/YYYY') - 1 + NUMTODSINTERVAL(level,'day') as data | |
FROM dual | |
WHERE TO_CHAR(TO_DATE('1/1/' || '2012','DD/MM/YYYY') - 1 + NUMTODSINTERVAL(level,'day'), 'YYYY') = '2012' | |
CONNECT BY LEVEL <= 366 |
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
# To make possible unzip in-memory Zip files with StringIO | |
module Zip | |
class ZipInputStream | |
def initialize(filename, offset = 0) | |
super() | |
@archiveIO = filename.class == String ? File.open(filename, "rb") : filename | |
@archiveIO.seek(offset, IO::SEEK_SET) | |
@decompressor = NullDecompressor.instance | |
@currentEntry = nil |
NewerOlder