Skip to content

Instantly share code, notes, and snippets.

View achiurizo's full-sized avatar
❄️

Arthur Chiu achiurizo

❄️
View GitHub Profile
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transactionHash": "0xa6f27e693709c76c96741c5ff4855d17243b365ce765019967b439c413e23897",
"transactionIndex": "0x0",
"blockHash": "0x4c7c36ab37d926816d0fbe11f03b681d5050fb3cfe1360f7116b912345117a6d",
"blockNumber": "0x3104",
"from": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1",
"to": "0x559e01ac5e8fe78963998d632e510bef3e306a78",

Keybase proof

I hereby claim:

  • I am achiurizo on github.
  • I am achiurizo (https://keybase.io/achiurizo) on keybase.
  • I have a public key ASB26aA0dncEfj6NAXn-f6ArIGms6KlKfBvfixUUB8CsTgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am achiu on github.
  • I am achiu (https://keybase.io/achiu) on keybase.
  • I have a public key whose fingerprint is 5801 FCD7 84F8 8C70 3858 920A D0EB 91E4 0E64 708B

To claim this, I am signing this object:

get :download, :with => :id do
content_type 'text/csv'
@csv.content #=> Just a String of CSV content
end
class Padrino::Application
helpers { def wut; "wut"; end }
end
class SubApp < Padrino::Application
register CookieInitializer
end
require File.expand_path('../config/boot.rb', __FILE__)
map '/' do
use SomeMiddleware
run Padrino.application
end
map '/stats' do
use AnotherMiddleware
run MyOtherApp
@achiurizo
achiurizo / apps.rb
Created February 1, 2012 19:15
sinatra hack to mount via padrino mount
# foo.rb
class Foo < ::Sinatra::Base
class << self
def dependencies; []; end
def setup_application!; end
end
get '/' do
'wubwub'
@achiurizo
achiurizo / decorator.rb
Created January 31, 2012 15:57
example decorator with padrino
module Decorator
include Padrino::Helpers::OutputHelpers
include Padrino::Helpers::TagHelpers
include Padrino::Helpers::FormatHelpers
include Padrino::Helpers::AssetTagHelpers
def self.included(base)
base.class_eval { attr_accessor :model }
base.extend ClassMethods
end
@achiurizo
achiurizo / config.ru
Created January 6, 2012 21:01
renee example
require 'renee'
run Renee {
# /hey/:slug
path '/hey' do
var do |slug|
halt "#{slug}!"
end
end