Add this line to your application's Gemfile:
gem 'dobedobedo'
And then execute:
$ bundle
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
<apex:page controller="CustomSettingController"> | |
<apex:pageMessages id="msgs" /> | |
<apex:form id="theform"> | |
<apex:inputField value="{!cs.Field1__c}" /> | |
<apex:inputField value="{!cs.Field2__c}" /> | |
<apex:commandButton value="{!$Label.CSTab_Save}" action="{!update}" rerender="msgs,theform" /> | |
</apex:form> | |
</apex:page> |
<apex:page controller="CustomSettingController"> | |
<apex:pageMessages id="msgs" /> | |
<apex:form id="theform"> | |
<apex:inputField value="{!cs.Field1__c}" /> | |
<apex:inputField value="{!cs.Field2__c}" /> | |
<apex:commandButton value="{!$Label.CSTab_Save}" action="{!update}" rerender="msgs,theform" /> | |
</apex:form> | |
</apex:page> |
after "deploy:symlink", "deploy:restart_workers" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') | |
cmd = "cd #{fetch(:latest_release)} && #{fetch(:rake, "rake")} RAILS_ENV=#{fetch(:rails_env, "production")} #{rake_cmd}" |
require 'dobedobedo' # please do this with the bundler. | |
include Dobedobedo # gives you access to the top level models. | |
#Dobedobedo does not use the web-flow for oAuth integration, instead relying on username and password, in conjunction with the oAuth client id / secret | |
connection = Dobedobedo::Connection.new(:client_id => 'Your Client Id', | |
:client_secret => 'Your Client Secret', | |
:username => 'Your Email Address', | |
:password => 'Your Passsord Here') | |
#by_name is an alias to find_workspace_by_name | |
workspace = connection.by_name('workspace name here') |
<apex:page docType="html-5.0" | |
showHeader="false" sidebar="false" | |
standardController="Contact"> | |
<apex:stylesheet value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery.mobile-1.3.0.min.css')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery-1.9.1.min.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'jquery.mobile-1.3.0.min.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.MobileSample_Resources_jQueryMobile, 'ForceTk.js')}"/> | |
<head> | |
<title>Meetups</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> |
boolean codeDidThrowException = false; | |
string message; | |
try { | |
code_that_will_cause_an_exception | |
} catch (System.calloutException sce) { | |
codeDidThrowException = true; | |
message = sce.getMessage(); | |
} |
MBProgressHUD.showHUDAddedTo(@view, animated:true) | |
BW::Reactor.defer(proc do | |
@posts = Post.query.find | |
end, proc do | |
MBProgressHUD.hideHUDForView(@view, animated:true) | |
end) |