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
moved to github --> https://github.com/bill-auger/git-branch-status/ |
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 | |
# Show the rate of swapping (in number of pages) between executions | |
OK=0 | |
WARNING=1 | |
CRITICAL=2 | |
UNKNOWN=-1 | |
EXITFLAG=$OK | |
WARN_THRESHOLD=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/sh | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
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 | |
# Calculate key dates for NYC legislation | |
# using data from https://github.com/jehiah/nyc_legislation | |
if ! command -v jq >/dev/null; then | |
echo "missing jq; brew install jq" | |
exit 1 | |
fi | |
if ! command -v json2csv >/dev/null; then |
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 | |
# | |
# ************************************************* | |
# chkconfig: 2345 99 99 | |
# description: notify email address on system boot. | |
# ************************************************* | |
# Installing: | |
# 1) save as /etc/rc.d/init.d/notify | |
# 2) set the desired email address in "MAILADD" variable | |
# 3) chmod a+w /etc/rc.d/init.d/notify |
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
cat City\ Owned\ and\ Leased\ Property\ \(COLP\)\ \ \ Shapefile.geojson | jq -c '{type:"FeatureCollection", features:[(.features[] | select(.properties.agency == "NYPD") | select(.properties.usecode | in({"0100": true, "0130":true, "0510":true, "0110":true, "0120":true, "0690":true}) )) ]}' > NYPD_parking.geojson |
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 | |
COUNT=1 | |
FILE=$0 | |
# run this script with bash | |
# i bet you can't predict the outcome | |
function printsleep { | |
echo COUNT=$(( COUNT++ )) | |
echo printsleep >> $FILE |
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
#include <stdlib.h> | |
/* | |
Returns a pointer to the first occurrence of character in the C string str. | |
The terminating null-character is considered part of the C string. Therefore, | |
it can also be located to retrieve a pointer to the end of a string. | |
@param str the string to be searched | |
@param len the number of characters to search | |
@param character the character to search for |
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 python | |
import sys | |
from ipaddress import IPv4Network | |
from collections import defaultdict | |
if __name__ == "__main__": | |
inputs = defaultdict(list) | |
for line in sys.stdin: | |
cidr = line.strip().decode('utf-8') |
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 | |
# run https://github.com/client9/misspell linter | |
SCRIPT=$(readlink -f "$0") | |
SCRIPTPATH=`dirname "$SCRIPT"` | |
# get to repo root | |
cd $SCRIPTPATH/../../.. | |
WRITE="" | |
while [ "$1" != "" ]; do | |
PARAM=${1%%=*} |
NewerOlder