Skip to content

Instantly share code, notes, and snippets.

View charltonAthletic's full-sized avatar

Andy Hitchings charltonAthletic

View GitHub Profile
@abhinavguptas
abhinavguptas / streamingNotifications.html
Created February 12, 2012 13:34
Force.com Streaming API Chrome Desktop Notifications
<apex:page sidebar="false" tabStyle="Account">
<apex:includeScript value="{!URLFOR($Resource.comet, 'cometd.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.comet, 'jquery-1.5.1.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.comet, 'jquery.cometd.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.comet, 'json2.js')}"/>
<style type="text/css">
#chatterNotificationPanel {
display: none;
}
@richardvanhook
richardvanhook / ApexOrg2Org
Created September 27, 2011 13:43
Apex code demonstrating how to log in from one salesforce org to another
/*
======================================================================
The following apex code demonstrates logging into another salesforce
org via the SOAP/XML web service api and then using session id to
query the standard REST API as well as the Chatter REST API.
To run this code, simply copy and paste into execute anonymous,
then replace the value of the first three variables accordingly.
NOTES:
(1) You'll need to create a remote site setting for both the login
@bussiere
bussiere / citations
Created December 24, 2010 10:16
citations quote informatic informatique quotes computer science
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
“In order to understand recursion, one must first understand recursion.” – Author Unknown
“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone.” – Bjarne Stroustrup
“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila.” – Mitch Ratcliffe
“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -C.A.R. Hoare
“The gap between theory and practice is not as wide in theory as it is in practice.” – Author Unknown
“If builders built buildings the way progra
@hallettj
hallettj / global-variables-are-bad.js
Created February 14, 2009 21:15
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {