Skip to content

Instantly share code, notes, and snippets.

View drscream's full-sized avatar
🕶️
Focusing

Thomas Merkel drscream

🕶️
Focusing
View GitHub Profile
## Disable DAD for Solaris
## http://wiki.hetzner.de/index.php/Solaris_DAD
# IPv4
/sbin/ipadm set-prop -p _arp_probe_count=0 ip
/sbin/ipadm set-prop -p _arp_fastprobe_count=0 ip
/sbin/ipadm set-prop -p _arp_defend_interval=0 ip
# IPv6
/sbin/ipadm set-prop -p _dad_announce_interval=0 ipv4
/sbin/ipadm set-prop -p _dad_announce_interval=0 ipv6
/sbin/ipadm set-prop -p _ndp_defend_interval=0 ip
#!/usr/bin/bash
## Load configuration information from USBKey
. /lib/svc/share/smf_include.sh
. /lib/sdc/config.sh
load_sdc_sysinfo
load_sdc_config
## Set the PATH environment because of other commands in /usr
{
"brand": "joyent",
"resolvers": ["8.8.8.8"],
"ram": 512,
"nics": [{
"nic_tag": "switch0",
"ip": "172.16.0.3",
"netmask": "255.255.255.0",
"gateway": "172.16.0.1",
"primary": true
@drscream
drscream / .bash_completion
Last active August 29, 2015 14:15
Place it in ~/.bash_completion.d
# debian, ubuntu do not support user generated bash_completion.d
# refs:
# - http://www.debian-administration.org/articles/316
# - http://www.debian-administration.org/article/An_introduction_to_bash_completion_part_2
DIR="${HOME}/.bash_completion.d"
# source completion directory definitions
if [ -d $DIR -a -r $DIR -a -x $DIR ]; then
for i in $DIR/*; do
[ \( -f $i -o -h $i \) -a -r $i ] && . $i
ansible 1.8.2_1
apt-dater 0.9.0
autoconf 2.69
autojump 22.2.4
automake 1.15
bash 4.3.33
bash-completion2 2.1_2
bison 3.0.4
bsdmake 24
cln 1.3.4
diff --git a/setup.js b/setup.js
index 876b560..4496a43 100644
--- a/setup.js
+++ b/setup.js
@@ -3,31 +3,31 @@ exports.setup = {
{
label: 'White',
values: {
- 'office': { 0:16, 1:255, 2:0, 3:255, 4: 255, 5:255, 15:16, 16:255, 17:0, 18:255, 19: 255, 20:255 }
+ 'office': { 0:16, 1:255, 2:0, 3:255, 4: 255, 5:255, 15:16, 16:255, 17:0, 18:255, 19: 255, 20:255, 31:0, 32:0, 33:0, 34:0 }
if allof(
header :contains ["X-Spam-Flag"] "YES",
header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["15"],
not header :contains "X-Spam-Score" "-",
not header :contains "X-Spam-Score" "0.0"
) {
discard;
stop;
}
if anyof(
@drscream
drscream / ansible_hosts
Created January 31, 2015 15:55
Modify `python` interpreter path to work in SmartOS zones with `ansible`
# host group
[smartos-zones]
server1.example.com
server2.example.com
server3.example.com
# modify python path
[smartos-zones:vars]
ansible_python_interpreter = /opt/local/bin/python
@drscream
drscream / check_pypi_mirror.sh
Last active November 10, 2015 18:20
Simple script to download the `last-modified` file from PyPI mirror and check if it's up-to-date.
#!/bin/bash
# Thomas Merkel <[email protected]>
# Check PyPI mirror with nagios
PROGPATH=$(echo ${0} | sed -e 's,[\\/][^\\/][^\\/]*$,,')
REVISION="1.1"
source ${PROGPATH}/utils.sh
# Function to print help
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
REPO=$(pwd)
if [ $# -eq 1 ]; then
REPO="$1"