Skip to content

Instantly share code, notes, and snippets.

View ntbrock's full-sized avatar

Taylor Brockman ntbrock

  • Brain Power Software
  • Charleston, SC
View GitHub Profile
import scala.util.parsing.combinator._
class HeaderPsvRegexParser extends HeaderCharacterRegexParser("|") {}
class HeaderCsvRegexParser extends HeaderCharacterRegexParser(",") {}
class HeaderCharacterRegexParser(delimiterCharacter:String) extends RegexParsers
{
// 2012-Jul-20 - The parser was removing splaces.
// 2015-Jul-07 - This override is required so that internal spaces remain.
override protected val whiteSpace = """[\t]""".r
@ntbrock
ntbrock / sketch_MemoryAutoReset.ino
Last active August 29, 2015 14:23
Arduino UNO Sketch - Memory Auto Reset low limit SRM malloc debugging
/**
* Say hello to Sainsmart UNO China clone. Cheap on Ebay, free USB A-B charger cord.
* 30 of them arrived in a box this week!
*
*
* Sketch also works well as a memory leak reset detector example, resets on < 250 free.
*
* @github ntbrock
* @gist: Arduino UNO Sketch - Memory Auto Reset low limit SRM malloc debugging
* @repo: https://github.com/ntbrock/bobino
# cat geoFail2Ban.sh
#!/bin/sh
export TMP_F2B='/tmp/fail2ban.cut'
cat /var/log/fail2ban.log|grep Ban|cut -f 7 -d ' ' > $TMP_F2B
while read p; do
echo -n $p
geoiplookup $p