Skip to content

Instantly share code, notes, and snippets.

View jookyboi's full-sized avatar

Rui Jiang jookyboi

View GitHub Profile
@jookyboi
jookyboi / check_checkbox.rb
Created February 25, 2013 19:28
Check checkbox in capybara
page.find("#checkbox").set(true)
<%= render :partial => "link_area", :layout => "graybar" %>
@jookyboi
jookyboi / explorer.js
Created March 1, 2013 22:09
Chrome extension for Salesforce.com REST API with OAuth2. http://www.anupshinde.com/salesforce-rest-api-chrome-extension
/* References
-- http://smus.com/oauth2-chrome-extensions/
-- http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com
*/
Math.uuid(16); // 16 char random string in base 62
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments,
ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
# production.rb, test.rb, development.rb or application.rb
YourApp::Application.configure do
config.action_mailer.smtp_settings = {
:address => "smtp.mandrillapp.com",
:port => 25, # ports 587 and 2525 are also supported with STARTTLS
:enable_starttls_auto => true, # detects and uses STARTTLS
:user_name => "MANDRILL_USERNAME",
:password => "MANDRILL_PASSWORD", # SMTP password is any valid API key
:authentication => 'login' # Mandrill supports 'plain' or 'login'
@jookyboi
jookyboi / heroku_env.sh
Created March 16, 2013 18:06
Push to different environments on Heroku
heroku push staging master
heroku push production master
@jookyboi
jookyboi / emacs_alias.sh
Created March 17, 2013 15:54
Alias emacs for bash shell.
alias e='emacs'