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 'nokogiri' | |
require 'active_support' | |
require 'builder' | |
require 'digest' | |
class Statement | |
attr_accessor :rows | |
HEADINGS = [:date,:type,:description,:paid_out,:paid_in,:balance] | |
def initialize(file) |
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
import cgi | |
import os | |
from google.appengine.ext.webapp import template | |
from google.appengine.api import users | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp.util import run_wsgi_app | |
from google.appengine.ext import db | |
from google.appengine.api import memcache | |
from google.appengine.api import urlfetch |
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
import sys | |
import string | |
def force_utf8(fragment): | |
try: | |
return fragment.decode('utf8') | |
except: | |
try: | |
return fragment.replace('\xe2\x80?', '\xe2\x80\x9d').decode('utf8') | |
except: |
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 datetime import datetime, tzinfo, timedelta | |
class TimeZone(tzinfo): | |
def __init__(self, name, offset): | |
self.name = name | |
self.offset = offset | |
self.timedelta = timedelta(hours=offset) | |
def utcoffset(self, dt): | |
return self.timedelta |
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
web: bin/python test-webapp.py |
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
ssh user@remote-server | |
cd /path/to/working-tree | |
git config receive.denyCurrentBranch ignore |
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
javascript:if%20(!window.goviasGrid)%20{var%20grid%20=%20window.goviasGrid%20=%20document.createElement(%22canvas%22);var%20height%20=%20window.screen.height;grid.width%20=%20960;grid.style.width%20=%20grid.width%20+%20%22px%22;grid.style.margin%20=%20%220%20auto%22;grid.style.height%20=%20height%20+%20%22px%22;grid.style.position%20=%20%22fixed%22;grid.style.top%20=%20%220%22;grid.style.bottom%20=%20%220%22;grid.style.left%20=%20%220%22;grid.style.right%20=%20%220%22;grid.style.display%20=%20%22none%22;grid.style.zIndex%20=%20%2299999%22;grid.onclick%20=%20function(el)%20{grid.style.display%20=%20%22none%22;};var%20ctx%20=%20grid.getContext(%222d%22);var%20grad%20=%20ctx.createLinearGradient(0,0,960,0);grad.addColorStop(0,%20%27rgba(255,0,0,0.3)%27);grad.addColorStop(0.2,%20%27rgba(255,165,0,0.3)%27);grad.addColorStop(0.4,%20%27rgba(255,255,0,0.3)%27);grad.addColorStop(0.6,%20%27rgba(0,128,0,0.3)%27);grad.addColorStop(0.8,%20%27rgba(0,0,255,0.3)%27);grad.addColorStop(1,%20%27rgba(128,0,128,0.3)%27);ctx.fillS |
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
openssl req -newkey rsa:1024 -nodes -keyout myssl.key -out myssl.csr |
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
//javascript:if%20(!window.goviasGrid)%20{var%20grid%20=%20window.goviasGrid%20=%20document.createElement(%22canvas%22);var%20height%20=%20window.screen.height;grid.width%20=%20960;grid.style.width%20=%20grid.width%20%22px%22;grid.style.margin%20=%20%220%20auto%22;grid.style.height%20=%20window.screen.height%20%22px%22;grid.style.position%20=%20%22fixed%22;grid.style.top%20=%20%220%22;grid.style.bottom%20=%20%220%22;grid.style.left%20=%20%220%22;grid.style.right%20=%20%220%22;grid.style.display%20=%20%22none%22;grid.style.zIndex%20=%20%2299999%22;grid.onclick%20=%20function(el)%20{grid.style.display%20=%20%22none%22;};var%20ctx%20=%20grid.getContext(%222d%22);var%20grad%20=%20ctx.createLinearGradient(0,0,0,150);addColorStop(0,%20%27rgba(0,255,0,0.2)%27);addColorStop(0,%20%27rgba(0,255,100,0.8)%27);addColorStop(1,%20%27rgba(0,255,0,0.2)%27);ctx.fillStyle%20=%20grad;for%20(var%20x%20=%200;%20x%20*%2080%20<%20grid.width;%20x)%20{ctx.fillRect(10%20x%20*%2080,%200,%2060,%20height);}ctx.fillStyle%20=%20%22rgba(200, |
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
if Rails::VERSION::MAJOR > 3 || Rails::VERSION::MINOR > 2 | |
raise "Get rid of line #{__LINE__} in #{__FILE__}" | |
else | |
require 'schema_hotfix' | |
end |
OlderNewer