But original post can not access anymore.
This file contains 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
object XmlHelpers { | |
val docBuilder = | |
javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder() | |
} | |
class NodeExtras(n: Node) { | |
def toJdkNode(doc: org.w3c.dom.Document): org.w3c.dom.Node = | |
n match { | |
case Elem(prefix, label, attributes, scope, children @ _*) => | |
// XXX: ns |
This file contains 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/sh | |
## | |
# Mount my development websites folder | |
# | |
# NOTE: Because this uses Mac OS X mounting techniques, all mac format | |
# images are supported and many other UNIX filesystem formats. | |
# (My Development Sites image is stored encrypted.) | |
# Location of the image to be mounted | |
IMAGE="$HOME/Documents/Development Sites.sparsebundle" |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
This file contains 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
#!/usr/bin/python | |
''' | |
Split gpx tracks at discontinuities, that is, pairs of points in a track that | |
are further than a given distance threshold. | |
''' | |
import collections | |
from lxml import etree | |
import math | |
import optparse | |
import re |
This file contains 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 | |
for f in $(egrep -o -R "defn?-? [^ ]*" * --include '*.clj' | cut -d \ -f 2 | sort | uniq); do | |
echo $f $(grep -R --include '*.clj' -- "$f" * | wc -l); | |
done | grep " 1$" |
This file contains 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 -e | |
# Inspired by: https://github.com/adrienthebo/git-tools/blob/master/git-truncate | |
if [[ (-z $1) || (-z $2) ]]; then | |
echo "Usage: $(basename "$0") DROP_AT_SHA1 BRANCH" | |
exit 1 | |
fi | |
if [[ ! $1 =~ ^[0-9a-f]{7,40}$ ]]; then | |
echo "Error: invalid Git commit SHA1" >&2 |
This file contains 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
#!/usr/bin/env bash | |
# bash script to generate tree structure of a directory | |
# Pravendra Singh (@hackpravj) | |
pwd=$(pwd) | |
find $pwd -print | sed -e "s;$pwd;\.;g;s;[^/]*\/;|__;g;s;__|; |;g" |
OlderNewer