Skip to content

Instantly share code, notes, and snippets.

View barrycarey's full-sized avatar

Matthew Carey barrycarey

  • T-Mobile
  • Maine
View GitHub Profile
@barrycarey
barrycarey / example.py
Last active March 23, 2016 17:39
TCAdmin Zip Directory
import clr
from System import Array, DateTime
from System.String import Format
from System.IO import File, DirectoryInfo, Path, Directory
clr.AddReference("TCAdmin.SDK")
from TCAdmin.SDK.Misc import CompressionTools
base_dir = ThisService.WorkingDirectory
files = []
@barrycarey
barrycarey / Example.js
Last active March 21, 2016 19:04
Something
// This can take a long time to run. It emits each result as it finds it.
findMatches.prototype.find = function(hash) {
console.log('Searching for hash: ' + hash);
for (var i=0; i < hashes.length; i++) {
if (hamming(hash, hashes[i].hash) < 10) {
console.log('emiiting match');
this.emit('found-match', hashes[i]);
}
}