usage: arp-to-mqtt [-t <prefix>] [-h host] [-i <interface>]
A utility script to dump an ARP table to a set of MQTT topics.
For each MAC with an IP publish a message to
<prefix>/<mac of interface>/<mac of device>/ip
and
String result = $(document).find("#result").text(); |
$ cat ~/bin/jarindex | |
#!/bin/bash | |
if [ -x /opt/csw/bin/gawk ] | |
then | |
awk=/opt/csw/bin/gawk | |
else | |
awk=awk | |
fi |
usage: arp-to-mqtt [-t <prefix>] [-h host] [-i <interface>]
A utility script to dump an ARP table to a set of MQTT topics.
For each MAC with an IP publish a message to
<prefix>/<mac of interface>/<mac of device>/ip
and
public class LocaleUtil { | |
private static Pattern pattern = Pattern.compile("^([a-z][a-z])(_([A-Z][A-Z]))?$"); | |
/** | |
* Returns null if the string couldn't be parsed | |
*/ | |
public static Locale parseStringToLocale(String s) { | |
Matcher matcher = pattern.matcher(s); | |
if(!matcher.matches()) { |
module Blaze where | |
import CLasH.HardwareTypes | |
type Word = Signed D4 | |
type RegisterIndex = Index D4 | |
data Instruction = | |
Nop | |
| In RegisterIndex |
-- This is hledger-lib/Hledger/Read/Format.hs | |
module Hledger.Read.Format where | |
import Numeric | |
import Data.Maybe | |
import Test.HUnit | |
import Text.ParserCombinators.Parsec hiding (spaces) | |
{- |
{ | |
object Parser { | |
def apply(name: String): Parser = Parser(name, Nil) | |
} | |
case class Parser(name: String, items: List[Parser]) { | |
// println("parser constructor: " + this) | |
def flatMap(parser: Parser => Parser): Parser = { | |
println("flatMap: " + this) |
#!/bin/sh | |
if [ -z "$SBT_VERSION" ] | |
then | |
SBT_VERSION=0.7.7 | |
fi | |
JAR=$HOME/.sbt/sbt-launch-$SBT_VERSION.jar | |
mkdir -p $HOME/.sbt |
#!/bin/bash | |
first=1 | |
# Skip the first line | |
read junk | |
export IFS="," | |
last_id=abc |
// Based off http://jmhofer.johoop.de/?p=292 / https://gist.github.com/2260897 | |
// Put this file under project/Build.scala | |
// Copy Scalatron/bin/Scalatron.jar to lib/ before compiling | |
// Tested with sbt version 0.11.2 | |
import sbt._ | |
import Keys._ | |
object Build extends Build { | |
val botDirectory = SettingKey[File]("bot-directory") |