Skip to content

Instantly share code, notes, and snippets.

View JWally's full-sized avatar

Justin Wolcott JWally

  • Dallas, Texas, United States
View GitHub Profile
@timsavery
timsavery / Ruby Download Parse JSON
Created January 22, 2012 15:19
Example For Downloading and Parsing JSON (Ruby)
require "rubygems"
require "json"
require "net/http"
require "uri"
uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
@jpoehls
jpoehls / node-cluster-messaging.js
Created March 29, 2012 01:48
Simple message passing between cluster master and workers in Node.js
var cluster = require('cluster');
if (cluster.isWorker) {
console.log('Worker ' + process.pid + ' has started.');
// Send message to master process.
process.send({msgFromWorker: 'This is from worker ' + process.pid + '.'})
// Receive messages from the master process.
@JWally
JWally / RelationshipTree.js
Last active September 8, 2022 12:13
Javascript Algorithm to build an org chart from an array of related objects
var ary = [
{id: "a", parent: 0},
{id: "b", parent: "a"},
{id: "c", parent: "b"},
{id: "d", parent: "c"},
{id: "e", parent: "d"},
{id: "f", parent: "e"},
{id: "g", parent: "f"},
{id: "h", parent: "g"},
{id: "i", parent: "h"},
@ken-itakura
ken-itakura / MD5.vb
Created November 8, 2016 12:58
Excel, Access VBA Function to create MD5 for text
Public Function MD5Hex(textString As String) As String   
Dim enc   
Dim textBytes() As Byte   
Dim bytes   
Dim outstr As String       
Set enc = CreateObject("System.Security.Cryptography.MD5CryptoServiceProvider")   
textBytes = textString   
bytes = enc.ComputeHash_2((textBytes))