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 / api-json.playground
Created August 22, 2014 18:29
Swift API call & parsing JSON
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 / 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 / AddToCart.evt
Last active December 29, 2022 17:11
Salesforce1 Lightning Demo for Spring '15
<aura:event type="APPLICATION" description="Add to cart event.">
<aura:attribute name="product" type="Product__c"/>
</aura:event>
@jeffdonthemic
jeffdonthemic / CustomAccountLookup.page
Last active January 12, 2021 15:17
Roll Your Own Salesforce "Lookup" Popup Window blog post
<apex:page controller="CustomAccountLookupController"
title="Search"
showHeader="false"
sideBar="false"
tabStyle="Account"
id="pg">
<apex:form >
<apex:outputPanel id="page" layout="block" style="margin:5px;padding:10px;padding-top:2px;">
<apex:tabPanel switchType="client" selectedTab="name1" id="tabbedPanel">
@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>
@jeffdonthemic
jeffdonthemic / ContactListViewComponent.component
Last active February 14, 2019 03:07
Code for ContactListViewComponents for enhancedList Visualforce component. http://blog.jeffdouglas.com/2014/12/12/enhancedlist-visualforce-component/
<apex:component controller="ContactListViewController">
<apex:attribute name="listViewName" type="String" required="true"
description="The name of the listview." assignTo="{!listName}"/>
<apex:enhancedList height="400" rowsPerPage="25" id="ContactList"
listId="{!listId}" rendered="{!listId != null}" />
<apex:outputText rendered="{!listId == null}" value="Could not find requewed ListView: '{!listName}'. Please contact your administrator."/>
</apex:component>
'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" }