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 python | |
import sys | |
import re | |
def do_parse(in_file, out_file): | |
try: | |
track_file = open(in_file, "r").read() | |
except: | |
print "Unable to open specified file, check the path." |
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 python | |
import urllib | |
import urllib2 | |
import getpass | |
import sys | |
import datetime | |
import time | |
class BlockReserve(object): |
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
=> Booting WEBrick | |
=> Rails 3.0.0.beta3 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Exiting | |
/home/blake/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-d916c62cfc7c59ab6411/activesupport/lib/active_support/dependencies.rb:440:in `load_missing_constant': ActiveRecord is not missing constant Timestamp! (ArgumentError) | |
from /home/blake/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-d916c62cfc7c59ab6411/activesupport/lib/active_support/dependencies.rb:153:in `block in const_missing' | |
from /home/blake/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-d916c62cfc7c59ab6411/activesupport/lib/active_support/dependencies.rb:151:in `each' | |
from /home/blake/.bundle/ruby/1.9.1/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-d916c62cfc7c59ab6411/activesupport/lib/active_support/dependencies.rb:151:in `const_missing' | |
from /home/blake/.bundle/ruby/1.9. |
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 Migration | |
class << self | |
def create_table(name, &block) | |
table = Table.new name | |
table.evaluate &block | |
table.create | |
end | |
def drop_table(name) | |
table = Table.new name |
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
def keep_stdout(&block) | |
begin | |
orig_stream, $stdout = $stdout, StringIO.new | |
block.call($stdout) | |
ensure | |
s, $stdout = $stdout.string, orig_stream | |
s | |
end | |
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
require 'rubygems' | |
require 'inline' | |
class MyTestInC | |
inline do |builder| | |
builder.c <<-EOF | |
long factorial(int max) { | |
int i=max, result=1; | |
while (i >= 2) { | |
result *= i--; |
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
# An example Jekyll converter. Utilizes the new plugin system. | |
# | |
# | |
# 1. Make a _plugins directory in your jekyll site, and put this class in a file there. | |
# 2. Any file in the _posts directory ending in .upcase will be processed using this converter. | |
module Jekyll | |
class UpcaseConverter < Converter | |
safe true |
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
# An example Jekyll generator. Utilizes the new plugin system. | |
# | |
# 1. Make a _plugins directory in your jekyll site, and put this class in a file there. | |
# 2. Upon site generation, version.html will be created in your root destination with | |
# # the version of Jekyll that generated it | |
module Jekyll | |
class VersionReporter < Generator | |
safe true |
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
# An example Jekyll Liquid tag. Utilizes the new plugin system. | |
# | |
# 1. Make a _plugins directory in your jekyll site, and put this class in a file there. | |
# 2. In anyone of your pages, you can use the 'render_time' liquid tag like so: | |
# {% render_time Page generated at: %} | |
module Jekyll | |
class RenderTimeTag < Liquid::Tag | |
def initialize(tag_name, text, tokens) |
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
From d4ed463815b8c7afcf95500a73754f2bca6b1b13 Mon Sep 17 00:00:00 2001 | |
From: Blake Smith <[email protected]> | |
Date: Tue, 29 Jun 2010 23:43:26 -0500 | |
Subject: [PATCH] Fix garbled UTF-8 characters | |
--- | |
.../2010-01-16-fully-document-your-datamapper.html | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/_posts/2010-01-16-fully-document-your-datamapper.html b/_posts/2010-01-16-fully-document-your-datamapper.html |
OlderNewer