This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
function usage { | |
echo >&2 "Usage: $0 [ -n nodename ]" | |
exit 1 | |
} | |
while getopts ":n:" FLAG; do | |
case $FLAG in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findXMPinJPEG(file) { | |
var dataView = new DataView(file); | |
if (debug) console.log("Got file of length " + file.byteLength); | |
if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) { | |
if (debug) console.log("Not a valid JPEG"); | |
return false; // not a valid jpeg | |
} | |
var offset = 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function xml2Object(xml) { | |
try { | |
var obj = {}; | |
if (xml.children.length > 0) { | |
for (var i = 0; i < xml.children.length; i++) { | |
var item = xml.children.item(i); | |
var attributes = item.attributes; | |
for(var idx in attributes) { | |
var itemAtt = attributes[idx]; | |
var dataKey = itemAtt.nodeName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handleBinaryFile(binFile) { | |
var data = findEXIFinJPEG(binFile); | |
var iptcdata = findIPTCinJPEG(binFile); | |
var xmpdata= findXMPinJPEG(binFile); // add | |
img.exifdata = data || {}; | |
img.iptcdata = iptcdata || {}; | |
img.xmpdata = xmpdata || {}; //add | |
if (callback) { | |
callback.call(img); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package akka.actor | |
import java.io.BufferedOutputStream | |
import java.io.FileOutputStream | |
import akka.dispatch._ | |
import java.util.concurrent.ExecutorService | |
import scala.concurrent.forkjoin.ForkJoinPool | |
import java.io.{OutputStream, Writer, OutputStreamWriter} | |
import TraversalHelper._ | |
import scala.collection.mutable.SortedSet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scanAndScroll: function(queryString, sourceFieldArray) { | |
var client = new $.es.Client({ | |
hosts: 'http://search.es.io:9200' | |
}); | |
var allRecords = []; | |
$("#exportProgressBarDiv").show(); | |
client.search({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create application | |
mkdir dnsvc | |
cd dnsvc | |
dotnet new console | |
# Program.cs | |
using System; | |
using System.Threading; | |
namespace dnsvc |
OlderNewer