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 |
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
" 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
#!/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
#!/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' | |
exit -1 if ARGV.size == 0 | |
filename = ARGV[0] | |
basename = File.basename(filename) |
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
# A xterm-256color based TERMINFO that adds the escape sequences for italic. | |
# | |
# Install: | |
# | |
# tic xterm-256color-italic.terminfo | |
# | |
# Usage: | |
# | |
# export TERM=xterm-256color-italic | |
# |
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
# configuration for osx clipboard support | |
set-option -g default-command "reattach-to-user-namespace -l sh" |
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/ruby | |
=begin | |
Usage: rtftomarkdown.rb FILENAME.rtf | |
Uses textutil, available on Mac only (installed by default) | |
Outputs to STDOUT | |
Notes: | |
Links are replaced with Markdown references (duplicate links combined). |
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
%!TEX TS-program = xelatex | |
\documentclass[12pt]{scrartcl} | |
% The declaration of the document class: | |
% The second line here, i.e. | |
% \documentclass[12pt]{scrartcl} | |
% is a standard LaTeX document class declaration: | |
% we say what kind of document we are making in curly brackets, | |
% and specify any options in square brackets. |
OlderNewer