Skip to content

Instantly share code, notes, and snippets.

View llad's full-sized avatar

Mark Woodall llad

View GitHub Profile
@llad
llad / SFDevConsoleExport.js
Last active August 29, 2015 14:08
Export Salesforce Developer Console query #paste
// credit: Ir0nm on StackExchange
// Reference: http://salesforce.stackexchange.com/questions/15328/export-results-from-developer-console-query-editor
var o = document.evaluate("//div[@id='editors-body']/div[not(contains(@style,'display:none') or contains(@style,'display: none'))]//table/tbody/tr",document,null,0,null);
var r = [];
while(row = o.iterateNext()){
var cols = row.getElementsByTagName('td');
var a = [];
for(var i=0; i<cols.length; i++){
@llad
llad / dirToCSV.js
Created March 13, 2014 13:54
Create a CSV of the contents of a directory. #nodejs
var fs = require('fs'),
dir = process.argv[2] || ".",
filenames,
i,
csv;
filenames = fs.readdirSync(dir);
for (i = 0; i < filenames.length; i++) {
console.log(filenames[i]);
@llad
llad / cycleblink.js
Last active December 17, 2015 01:29
First Beaglebone code using Bonescript. Makes the on-board LEDs cycle.
@llad
llad / README.md
Created October 19, 2012 14:54
D3 Table with Inline Bar Indicator

See it in action at: bl.ocks.org (Note: bl.ocks.org link won't work for IE 8.)

#Overview This is a simple D3 constructed table that includes an inline CSS-based bar indicator for negative and positive values. Since it is CSS and not SVG, it works on IE 8 (and maybe earlier) by including Sizzle and a shim from Aight. Save it locally to test out IE 8 compatibility.

@llad
llad / README.md
Created September 25, 2012 02:53
Reusable D3 column chart with transparency dimension

See it in action on bl.ocks.org

Created to look at returns within a portfolio of investments, this shows the allocation to a particular investment using transparency of the columns. The more opaque the column, the greater the allocation in the portfolio.

This also connects to this Google Spreadsheet for data.

This builds on my column chart gist

@llad
llad / README.md
Created September 22, 2012 15:49
Reusable D3 column chart that supports negative values