Skip to content

Instantly share code, notes, and snippets.

package main
import (
"bufio"
"fmt"
"image"
_ "image/jpeg"
"os"
"os/exec"
"runtime"
@simonjefford
simonjefford / Example JWT
Last active August 29, 2015 14:04
Salesforce
Raw Token
---------
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjE5MCJ9.eyJleHAiOjE0MDY4MTkwODMsInN1YiI6Imh0dHBzOi8vbG9naW4uc2FsZXNmb3JjZS5jb20vaWQvMDBEMjAwMDAwMDBuVjBhRUFFLzAwNTIwMDAwMDAzaEhsREFBVSIsImF0X2hhc2giOiItZU4tdzgteFZzcm4wVHJKQzh0THp3IiwiYXVkIjoiM01WRzlXdFdTS1VERy54NndzZUhDWklkX055aDVaUU9CZWpKZjRONE55VF9OaVJUd2FsbE5lUjVLMFZ4dzFiWGFJY0JMOWNob2tiQlhpYmtTR01ZUiIsImlzcyI6Imh0dHBzOi8vbG9naW4uc2FsZXNmb3JjZS5jb20iLCJpYXQiOjE0MDY4MTg5NjN9.MnFuklB18wjGotkaWPqcUMb0cRT57UfsPCYUUmJVUur5YNFtimQz6l-7iBzKxow1J6nj-7YRyIbwID5TcXFesnP_aMP62rPNFOIZ-nMfYcoG0FnnIxq5s-thfk0jIJSpv_Teb4p1EdBzKfKKb9rxJ4FGP5AlLloJTfqpU17P82TBIBGKPiT8o19DWYUmdn6kUuzM04rSDc2OaCfb4OqodgzpnBXFbXwpUZi15wqZ97NaGBG6turatUguP3wHRcugD8uXqu0aBzqWoUztAxloQiCIS7mPTmO7EYZcUybZUfKUFPygipN_CrgPzGLtUWTQpBoZ-w8xcjTWzrgUBWW1J6o2FN3Dqr7ecgcfxCCSSTFBmDg3wfp9MOb3ztJoN4MFM-IlSC3m5Bx_loyjj_srRV6VDEW_-WChNIaRiGZG2UuVKeXqMCyckUO89lAikx6U0pQMafgPwTsMoaEVJp2cG7fTt0jzvwuijb65kJq_ACx77fIhH829_17HA9FOVukZWTfPjj9EepEVMd4x16NWCOgU3pSjBdKdmMTbIJ3vXBZE5FA_e1nYv7q2D__7ifHu_O
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
name: require('./package.json').name,
wrapInEval: true,
minifyCSS: {
grunt.registerTask('watchAndBuild', 'watch and build for app changes (with Live Reload)', function() {
this.async();
var leek = require('leek');
var watcher = buildWatcher({
ui: ui,
analytics: leek
});
var opts = {
environment: 'development',
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
@simonjefford
simonjefford / version1.cs
Created October 2, 2013 15:04
Why put braces around single lines?
if (someCondition)
service.DoSomething();
package main
import (
"fmt"
"strings"
)
type Name string
func (n Name) FirstName() string {
@simonjefford
simonjefford / GooddataFileWatcher.cs
Last active December 18, 2015 02:58
Getting an index in LINQ
foreach (var exceptionWithIndex in e.InnerExceptions.Select((x, i) => new { Exception = x, Index = i + 1}))
{
this.LogException(string.Format("Exception {0}", exceptionWithIndex.Index), exceptionWithIndex.Exception);
}
@simonjefford
simonjefford / gist:4723091
Last active December 12, 2015 05:38
Handlebars command line options (looks like -n will do the trick)
Options:
-f, --output Output File [string]
-a, --amd Exports amd style (require.js) [boolean]
-c, --commonjs Exports CommonJS style, path to Handlebars module [string] [default: null]
-h, --handlebarPath Path to handlebar.js (only valid for amd-style) [string] [default: ""]
-k, --known Known helpers [string]
-o, --knownOnly Known helpers only [boolean]
-m, --min Minimize output [boolean]
-n, --namespace Template namespace [string] [default: "Handlebars.templates"]
-s, --simple Output template function only. [boolean]
"SCL version 1.7 and SCL version 2.0 are both included in the Windows Azure SDK 1.8,
which can be downloaded from the .NET Developer Center. Both versions of the SCL are
also available through NuGet. The WindowsAzure.Storage Nuget package for SCL version 2.0
has an updated major version number of 2.0."
http://msdn.microsoft.com/en-us/library/windowsazure/jj721952.aspx