Skip to content

Instantly share code, notes, and snippets.

@egladman
egladman / svg_to_dxf.sh
Last active December 6, 2016 17:35
convert svgs to dxf
#!/bin/bash
dependencies=(
"inkscape"
"pstoedit"
)
# check if dependencies are indeed installed
for program in "${dependencies[@]}"
do
@egladman
egladman / find_gh_username.sh
Last active July 15, 2016 09:00
Determines a person's Github username from their git config
#!/bin/bash
email=$(git config --global user.email)
json=$(curl -s "https://api.github.com/search/users?q=${email}+in:email")
echo $json | grep -Po '(?<="login": ")[^"]*'
// https://gist.github.com/TheDistantSea/8021359
function versionCompare(v1, v2, options) {
var lexicographical = options && options.lexicographical,
zeroExtend = options && options.zeroExtend,
v1parts = v1.split('.'),
v2parts = v2.split('.');
function isValidPart(x) {
return (lexicographical ? /^\d+[A-Za-z]*$/ : /^\d+$/).test(x);
@egladman
egladman / index.html
Created September 26, 2015 20:48
simpleWeather.geolocation.js
.weather
#code
#condition
#sunrise
#sunset