Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

James Gibson james-gibson

🏠
Working from home
View GitHub Profile
@james-gibson
james-gibson / SummarizeAccountContacts
Created Sep 5, 2014
Contact summary trigger w/test
View SummarizeAccountContacts
trigger SummarizeAccountContacts on Contact (after delete, after insert) {
set<ID> accountIds = new set<ID>();
set<ID> contactIds = new Set<ID>();
public void addValidAccountId(Id i)
{
if(i !=null)
accountIds.add(i);
}
@james-gibson
james-gibson / effa
Created Jan 2, 2014
Why do flamingos exist?
View effa
Her: After a rocky start to the day, not bad. Currently pondering the purpose for the existence of flamingos.
Me: Because peacocks don't make great lawn ornaments in Florida.
Her: They would if the people of Florida would just give them a chance!
Me: Equal feathers for all!
Her: You shouldn't make fun of such a serious issue. Equal rights for birds in Florida is an important and vital concern in the current political market
@james-gibson
james-gibson / Sample resume from api
Created Dec 18, 2013
GET api/resume?token=[token]
View Sample resume from api
{
"summary": {
"profiles": [
"http://careers.stackoverflow.com/jamesgibson",
"http://www.linkedin.com/pub/james-gibson/16/8bb/5b3"
]
},
"social": {
"twitter": "https://twitter.com/brainchildpro"
},
@james-gibson
james-gibson / GET: api (auth)
Created Dec 18, 2013
Authenticated with ?token
View GET: api (auth)
[
"http://localhost:3001/api/summary?token=AgileMD",
"http://localhost:3001/api/employment?token=AgileMD",
"http://localhost:3001/api/education?token=AgileMD",
"http://localhost:3001/api/social?token=AgileMD",
"http://localhost:3001/api/professional?token=AgileMD",
"http://localhost:3001/api/resume?token=AgileMD"
]
View GET: api
{
"message": "Invalid User and Key",
"code": 401
}
View localhost:3001
{
"version": "0.1",
"about": "This API exists as a description of James Gibson and his skills",
"why": "PDF's are so 2001",
"authentication": {
"URL": "http://localhost:3001/api/authenticate",
"queryParameters": [
"user",
"key"
]
View gist:7934166
[
null,
null,
null,
null,
null,
null,
null,
null,
null,
@james-gibson
james-gibson / tabularExample
Created Oct 10, 2013
Prototyped attempt at describing a bar/line series chart through a tabular like format using nested arrays.
View tabularExample
[["month","current","prior","current-info","prior-info"],
["October",90,55,"October Usage was 90mbtu","October Usage was 55mbtu"],
["November",null,75,"November Usage is unavailable","November Usage was 75mbtu"],
["December",null,88,"December Usage is unavailable","December Usage was 88mbtu"],
["January",89,78,"January Usage was 89mbtu","January Usage was 78mbtu"]]
@james-gibson
james-gibson / jsonExample
Created Oct 10, 2013
Describing chart data for a bar or line series chart
View jsonExample
{
"data": [
{
"series": {
"seriesID": "current",
"values": [
{
"value": 90,
"info": "October Usage was 90mbtu"
},
@james-gibson
james-gibson / gist:5687817
Created May 31, 2013
lones block changes
View gist:5687817
{
"blockSummary": {
"0": {
"placed": 5,
"destroyed": 150
},
"1": {
"placed": 621,
"destroyed": 0
},