Skip to content

Instantly share code, notes, and snippets.

View jeffdonthemic's full-sized avatar
💭
Currently being awesome

Jeff Douglas jeffdonthemic

💭
Currently being awesome
View GitHub Profile
@jeffdonthemic
jeffdonthemic / Dockerfile
Created August 7, 2014 16:46
'Cribs' Dockerfile
FROM google/golang
WORKDIR /gopath/src/github.com/topcoderinc/cribs
ADD . /gopath/src/github.com/topcoderinc/cribs/
# go get all of the dependencies
RUN go get github.com/codegangsta/martini
RUN go get github.com/codegangsta/martini-contrib/render
RUN go get github.com/codegangsta/martini-contrib/binding
RUN go get labix.org/v2/mgo
@jeffdonthemic
jeffdonthemic / results.txt
Created September 2, 2014 19:44
nforce-tooling runTestsAsync results
$ node examples/runTests.js
*** Running tests asynchronously. I know. This is awesome!! ***
Inserted ApexClass ToolingTest1
Inserted ApexClass ToolingTest2
Inserted ApexClass ToolingTest2_Test
Inserted ApexClass ToolingTest1_Test
Started async runTests job 707o000000AmuQD
Checking status of runTests job 707o000000AmuQD repeatedly until all tests complete.
All tests have completed! W00t!
========================================
@jeffdonthemic
jeffdonthemic / Playground.js
Last active August 29, 2015 14:06
Swift HP IDOL OnDemand
import Foundation
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely()
/**
Paste all the code from the following file
- https://github.com/lingoer/SwiftyJSON/blob/master/SwiftyJSON/SwiftyJSON.swift
**/
@jeffdonthemic
jeffdonthemic / BlogRequireJSDinamic.app
Last active August 29, 2015 14:11
Topcoder Blog Gists
<aura:application>
<aura:handler event="forcelogic2:BlogRequireJSEvent" action="{!c.initJS}"/>
<aura:registerEvent type="forcelogic2:BlogRequireJSEvent" name="requireJSEvent"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<div id="afterLoad">Old value</div>
</aura:application>
'use strict';
var app = angular.module('app');
app.controller('AccountDetailCtrl', function($scope, $routeParams, Account) {
$scope.account = Account.get({id:$routeParams.id});
$scope.mode = 'display';
$scope.edit = function() {
@jeffdonthemic
jeffdonthemic / config.json
Created January 29, 2015 13:12
Download file from S3 to disk
{ "accessKeyId": "akid", "secretAccessKey": "secret", "region": "us-east-1" }
@jeffdonthemic
jeffdonthemic / test.go
Created February 5, 2015 17:22
Go-Force Snippets
package main
import (
"fmt"
"log"
"github.com/nimajalali/go-force/force"
"github.com/nimajalali/go-force/sobjects"
)
@jeffdonthemic
jeffdonthemic / AngularDemoController.cls
Created February 6, 2015 20:37
Hello Angular Visualforce Page & Controller
global with sharing class AngularDemoController {
// hardcode an account id for demo purposes
static String accountId = '0017000001CwYz9';
global static String getAccount() {
return JSON.serialize([select name, billingstreet,
billingcity, billingstate, billingpostalcode
from account where id = :accountId][0]);
}
@jeffdonthemic
jeffdonthemic / gist:2146052
Created March 21, 2012 10:31
MemberRestSvc - Apex REST Service (v24)
@RestResource(urlMapping='/v.9/member/*/results/*')
global with sharing class MemberRestSvc {
@HttpGet
global static ReturnClass doGet() {
String[] uriKeys = RestContext.request.requestURI.split('/');
// get the member name from the uri
String memberName = uriKeys.get(uriKeys.size()-3);
@jeffdonthemic
jeffdonthemic / gist:2146160
Created March 21, 2012 10:54
Test_MemberRestSvc - Test Class for Apex REST Service (v24)
@isTest
private class Test_MemberRestSvc {
static {
// setup test data
}
static testMethod void testDoGet() {
RestRequest req = new RestRequest();