Skip to content

Instantly share code, notes, and snippets.

@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@mmalawski
mmalawski / 10.8 Rails Development Environment
Created October 7, 2012 14:20
Mac OSX Mountain Lion guide to installing Ruby,Rails,MySQL,Mon
# Mac OSX Mountain Lion
# Ruby on Rails Development Environment
# RVM
curl -L https://get.rvm.io | bash -s stable && rvm install 1.9.3 && rvm install 1.8.7
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source ~/.bash_profile
# Disable rarely used RDOC
@trcarden
trcarden / gist:3295935
Created August 8, 2012 15:28
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@brasic
brasic / gist:1650177
Created January 20, 2012 23:22 — forked from bibendi/gist:1315929
make action and fragment caching of rails 3.0.9 compatible with content_for
module ActionController
class Metal
attr_internal :cached_content_for
end
module Caching
module Actions
def _save_fragment(name, options)
return unless caching_allowed?
@saetia
saetia / gist:1623487
Last active March 19, 2024 15:21
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@jacquescrocker
jacquescrocker / gist:1318784
Created October 27, 2011 04:35 — forked from mattetti/gist:1318670
google cloud print pointers
# this works with oauth 0.5.1
client = OAuth2::Client.new(CLIENT_ID, CLIENT_SECRET,
:authorize_url => "/o/oauth2/auth",
:token_url => "/o/oauth2/token",
:site => 'https://accounts.google.com/')
redirect_uri = "#{SERVER_URL}/oauth2callback"
get '/auth' do
module Sunspot
module SessionProxy
class NamespacedSessionProxy
class MultipleConnectionsError < StandardError
def initialize
super("Can not perform operations against multiple namespaced (connections)")
end
end
class NotImplementedError < StandardError
def initialize
@stackng
stackng / rails content_for caching
Created March 29, 2011 06:30
make action and fragment caching of rails3 compatible with content_for
module ActionController
class Metal
attr_internal :cached_content_for
end
module Caching
module Actions
def _save_fragment(name, options)
return unless caching_allowed?