Skip to content

Instantly share code, notes, and snippets.

View stan's full-sized avatar
💭
¯\_(ツ)_/¯

stan

💭
¯\_(ツ)_/¯
View GitHub Profile
@stan
stan / ie67891011-css-hacks.txt
Created March 8, 2017 15:21 — forked from ricardozea/ie67891011-css-hacks.txt
IE CSS hacks - IE6, 7, 8, 9, 10, 11
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================
build_package_combined_patch() {
local package_name="$1"
{
curl https://raw.github.com/skaes/rvm-patchsets/master/patchsets/ruby/1.9.3/p448/railsexpress | xargs -I % curl https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p448/% | patch -p1
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1
@stan
stan / 1.9.3-p392-railsexpress
Last active December 15, 2015 02:09
1.9.3-p392-railsexpress
build_package_combined_patch() {
local package_name="$1"
{
curl https://raw.github.com/skaes/rvm-patchsets/master/patchsets/ruby/1.9.3/p392/railsexpress | xargs -I % curl https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p392/% | patch -p1
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1
@stan
stan / 1.9.3-p385-falcon
Last active December 12, 2015 12:09
Performance patch for rbenv ruby 1.9.3-p385 (funny-falcon with backport-gc)
build_package_combined_patch() {
local package_name="$1"
{
curl https://github.com/funny-falcon/ruby/compare/p385...p385_falcon_gc.diff | patch -p1
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1
@stan
stan / undo.rb
Created September 27, 2012 10:08
Undo for mongoid
module Mongoid
module Undo
extend ActiveSupport::Concern
included do
include Mongoid::Document
field :version, type: Integer, default: 0
before_save :prepare_versioning
after_save :create_version
@stan
stan / gist:1704142
Created January 30, 2012 12:24
Look Up in 1Password
javascript:window.location='onepassword://'+window.location.href.substring(window.location.href.indexOf('//')+2)
@stan
stan / changes.diff
Created October 12, 2011 06:37
Differences between Rails 3.0.9 & Rails 3.1.1 generated apps (all in one)
Only in 3.1.1/blank/app: assets
Only in 3.1.1/blank/app/mailers: .gitkeep
Only in 3.1.1/blank/app/models: .gitkeep
diff -U 0 -r 3.0.9/blank/app/views/layouts/application.html.erb 3.1.1/blank/app/views/layouts/application.html.erb
--- 3.0.9/blank/app/views/layouts/application.html.erb 2011-10-12 15:17:34.853020000 +0900
+++ 3.1.1/blank/app/views/layouts/application.html.erb 2011-10-12 15:23:26.162309000 +0900
@@ -5,3 +5,3 @@
- <%= stylesheet_link_tag :all %>
- <%= javascript_include_tag :defaults %>
- <%= csrf_meta_tag %>
ActionController::RoutingError (No route matches "/webconsole"):
lib/rack/runtime.rb:18:in `call'
Rendered /home/stan/.rvm/gems/ruby-1.9.2-p290@skeleton/gems/actionpack-3.0.9/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.3ms)
@stan
stan / jquery.filterbydata.js
Created July 20, 2011 01:19 — forked from elijahmanor/jquery.filterbydata.js
filterByData jQuery Plugin
// http://www.elijahmanor.com/2011/07/filterbydata-jquery-plugin.html
// https://gist.github.com/1048942
(function($) {
/* by Elijah Manor with collaboration from Doug Neiner
* Filter results by html5 data attributes either at
* design or at runtime
*
* Usages:
@stan
stan / 0_instructions.txt
Created May 19, 2011 02:25 — forked from sgruhier/0_instructions.txt
Sprocket 2 in Rails 3.0.x ala Rails 3.1
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript
powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the
filesystem will be different but this guide will get you working with it
while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention