Skip to content

Instantly share code, notes, and snippets.

@wmono
wmono / down.sh
Created October 27, 2010 15:24
OpenVPN dhcp-options handlers for Mac OS X (Snow Leopard)
#!/bin/bash
# Down script for OpenVPN
# Copyright (c) 2010 eqv.ca
# Licensed under New BSD http://www.opensource.org/licenses/bsd-license.php
NETSTAT=/usr/sbin/netstat
NETWORKSETUP=/usr/sbin/networksetup
# Override DHCP values or leave blank
DNS=
@wmono
wmono / logstash-loglevel.rb
Last active August 29, 2015 13:55
Logstash filter to normalize log level/severity for syslog, JCL, JUL
require "logstash/filters/base"
require "logstash/namespace"
#
# Filter plugin to normalize log levels from various logging frameworks
#
# The output field (log_level by default) will contain a number between
# 100 and 999, inclusive, with higher numbers indicating higher
# importance or severity.
#
@wmono
wmono / jdk.sh
Last active June 8, 2023 20:18
This is my JDK switcher script. Assumes bash. You should probably use something like SDKMAN! instead.
#!/bin/bash
# https://gist.github.com/wmono/3b19e6613fb0e8abd798f0644d96c4aa
JDK_PREFIX="${JDK_PREFIX:-$HOME/local}"
###############################################################################
request="$1"
changed_jdk=0