Skip to content

Instantly share code, notes, and snippets.

@xmas
xmas / formatjson.js
Created June 26, 2017 22:12 — forked from kristopherjohnson/formatjson.js
Read JSON from standard input and writes formatted JSON to standard output. Requires Node.js.
#!/usr/bin/env node
// Reads JSON from stdin and writes equivalent
// nicely-formatted JSON to stdout.
var stdin = process.stdin,
stdout = process.stdout,
inputChunks = [];
stdin.resume();
@xmas
xmas / AsyncReportController.cls
Created January 15, 2016 05:48 — forked from peterknolle/AsyncReportController.cls
Asynchronous Reports with the Analytics API in Apex
public with sharing class AsyncReportController {
public List<SelectOption> availableReports { get; set; }
public Id reportId { get; set; }
public Id instanceId { get; set; }
public Boolean reportIsRunning { get; set; }
private transient Reports.ReportResults reportResults;
public AsyncReportController() {
availableReports = retrieveAvailableReports();