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
# gem 'activerecord', '=4.0.2' | |
gem 'activerecord', '=4.1.0.rc1' | |
require 'active_record' | |
require 'minitest/autorun' | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
ActiveRecord::Base.establish_connection(adapter: "postgresql", host: "localhost", user: "cristi", database: "test") | |
class Message < ActiveRecord::Base | |
connection.create_table table_name, force: true do |t| |
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
# Customize to your needs... | |
export PATH=~/bin/chelu:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
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
- pixel editor | |
- existing work | |
- http://piq.codeus.net/ - nice features but in flash | |
- http://code.google.com/p/grafx2/ - very advanced, windows | |
- http://pixie.strd6.com/pixel-editor - js, simple | |
- [http://www.rw-designer.com/online_icon_maker.php]() | |
- http://canvaspaint.org/ - js mspaint clone | |
- http://www.amberfrog.com/product/bme/ | |
- new existing work | |
- http://muro.deviantart.com/ |
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
# include bundled assets if not in development | |
# this allows us to deploy without installing jammit | |
module JammitHelper | |
def include_stylesheets(*packages) | |
return super if Rails.env.development? || Rails.env == 'test' | |
options = packages.extract_options! | |
files = asset_tags(:css, packages) | |
files.push(options) unless options.empty? |
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 HamlJs | |
class Filter | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
dup._call(env) | |
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
" VAMP 0.1 | |
" Script to send answers to vamp questions. | |
" | |
" Read more at: | |
" http://vamp.ducki.es | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" CONFIG YOUR VAMP DETAILS BELOW | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
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
#!/bin/bash | |
# from http://code.google.com/p/macvim/wiki/Building | |
cd src | |
make clean | |
./configure --enable-gui=macvim --with-features=huge --enable-cscope --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-sniff --enable-multibyte --with-macarchs=x86_64 --with-macsdk=10.6 | |
make | |
cd MacVim | |
xcodebuild | |
rm -rf MacVim.app |
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 'rubygems' | |
require 'mail' | |
Mail.defaults do | |
smtp "smtp.gmail.com" do | |
port 587 | |
enable_tls | |
user "[email protected]" | |
pass "yomommasobig" | |
helo "localhost.localdomain" |
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 'iconv' | |
require 'rubygems' | |
require 'mail' | |
s = Mail::SubjectField.new("From", 'Subject: =?ISO-8859-1?Q?Re=3A_ol=E1?=') | |
s.decoded # => "Re: ol\341" (LATIN1 bytes) | |
Iconv.conv("UTF8", "LATIN1", s.decoded) # => "Re: ol\303\241" (UTF8 bytes) | |
Mail::Encodings.unquote_and_convert_to(s.value, 'UTF8') # => "Re: ol\303\241" (UTF8 bytes) |
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 'net/http' | |
module Rack | |
class GistInline | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
status, headers, body = @app.call(env) |
NewerOlder