start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/python | |
''' Not my script, found on the Internet, and rediscovered on my hard drive | |
''' | |
import sys | |
def cidr_to_regex(cidr): | |
ip, prefix = cidr.split('/') | |
base = 0 | |
for val in map(int, ip.split('.')): |
// I2C to USB Adapter using Arduino | |
// by Bernhard Kraft <kraftb@think-open.at> | |
/** | |
* This sketch can get loaded onto an Arduino to use it as USB to I2C Adapter. | |
* It uses the Wire library. So take a look at the documentation of the Wire | |
* libarary about the pins being used as SDA/SCL. For most Arduino boards this | |
* will be analog input pin 4 for SDA and analog input pin 5 for SCL. | |
* | |
* On the USB side the default serial link of the Arduino is used. A protocol |
#include "FastLED.h" | |
// FastLED "100-lines-of-code" demo reel, showing just a few | |
// of the kinds of animation patterns you can quickly and easily | |
// compose using FastLED. | |
// | |
// This example also shows one easy way to define multiple | |
// animations patterns and have them automatically rotate. | |
// | |
// -Mark Kriegsman, December 2014 |
#!/usr/bin/env python | |
''' Splunk deployment based on CIDR | |
Splunk's deployment server does not support CIDR based matching out of the box, | |
but they do support PCRE regex matching. I found this script online and | |
modified it slightly to match Splunk's specific regex variation. (Basically, | |
Splunk uses standards PCRE but replace the meaning of "." and "*" to act more | |
like traditional glob strings.) The values returned by this script can be | |
used in the serverclass.conf for either whitelist.<n> or blacklist.<n> values. | |
See the Splunk docs for more details. |