Skip to content

Instantly share code, notes, and snippets.

View james-gibson's full-sized avatar
:shipit:
Exiting VSCode with :wq

James Gibson james-gibson

:shipit:
Exiting VSCode with :wq
View GitHub Profile
@james-gibson
james-gibson / SummarizeAccountContacts
Created September 5, 2014 15:54
Contact summary trigger w/test
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 January 2, 2014 18:35
Why do flamingos exist?
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 December 18, 2013 17:56
GET api/resume?token=[token]
{
"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 December 18, 2013 17:55
Authenticated with ?token
[
"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"
]
@james-gibson
james-gibson / GET: api
Created December 18, 2013 17:55
Unathenticated
{
"message": "Invalid User and Key",
"code": 401
}
@james-gibson
james-gibson / localhost:3001
Created December 18, 2013 17:54
Unauthenticated
{
"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"
]
@james-gibson
james-gibson / gist:7934166
Created December 12, 2013 19:44
JS array goof
[
null,
null,
null,
null,
null,
null,
null,
null,
null,
@james-gibson
james-gibson / tabularExample
Created October 10, 2013 22:30
Prototyped attempt at describing a bar/line series chart through a tabular like format using nested arrays.
[["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 October 10, 2013 22:17
Describing chart data for a bar or line series chart
{
"data": [
{
"series": {
"seriesID": "current",
"values": [
{
"value": 90,
"info": "October Usage was 90mbtu"
},
@james-gibson
james-gibson / gist:5687817
Created May 31, 2013 20:38
lones block changes
{
"blockSummary": {
"0": {
"placed": 5,
"destroyed": 150
},
"1": {
"placed": 621,
"destroyed": 0
},