Skip to content

Instantly share code, notes, and snippets.

Avatar

Jhimy Fernandes Villar stjhimy

View GitHub Profile
View gist:1975644
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
@rubiii
rubiii / monkey_path.rb
Created Jan 29, 2012
Monkey patch Savon to allow attributes to be added to the SOAP header tag
View monkey_path.rb
require "savon"
module Savon
module SOAP
class XML
attr_accessor :header_attributes
def to_xml
@xml ||= tag(builder, :Envelope, complete_namespaces) do |xml|
@burke
burke / 0-readme.md
Created Jan 27, 2012 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv
View 0-readme.md

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@yevgenko
yevgenko / .Xdefaults
Created Aug 24, 2011
URxvt settings with solarized theme
View .Xdefaults
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@rodrigotassinari
rodrigotassinari / gist:1078666
Created Jul 12, 2011 — forked from sagmor/gist:1041943
Patched Ruby 1.9.2 for faster load and GC
View gist:1078666
# Ruby 1.9 Fast require:
# https://gist.github.com/1008945
curl https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch > load.patch
# Ruby 1.9.2 GC Patch:
# https://gist.github.com/856296
curl https://raw.github.com/gist/856296/a19ac26fe7412ef398bd9f57e61f06fef1f186fe/patch-1.9.2-gc.patch > gc.patch
rvm install 1.9.2-p180 --patch load.patch,gc.patch -n loadgc
rm gc.patch load.patch
You can’t perform that action at this time.