Skip to content

Instantly share code, notes, and snippets.

View DanielThomas's full-sized avatar

Danny Thomas DanielThomas

View GitHub Profile
@DanielThomas
DanielThomas / colorize-maven.sh
Created December 3, 2012 19:25 — forked from mike-ensor/colorize-maven.sh
Colorize Maven output
#!/bin/sh
# Written by Mike Ensor (mike@ensor.cc)
# Copywrite 2012
# Use as needed, modify, have fun!
# This is intended to be used for Maven3 + Mac OSX
#
# To use:
# in your ".bashrc" or ".bash_profile" add the following line:
# source ~/<path to script>/colorize-maven.sh
@DanielThomas
DanielThomas / autostart-vpnc.sh
Created December 5, 2012 19:00
init script to automatically start vpnc on TomatoUSB 1.28 Shibby K26RT-N build 101
#!/opt/bin/bash
#
# requires: ipkg install bash procps
SERVICE_NAME=autostart-vpnc.sh
LOGFILE=/opt/var/log/$SERVICE_NAME.log
PACKET_LOGFILE=/var/log/messages
EXTERNAL_IF=vlan2
POLLING_INTERVAL=30
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package com.netflix.lint.rule.nebula
import com.netflix.nebula.lint.FileMode
import com.netflix.nebula.lint.rule.GradleLintRule
import com.netflix.nebula.lint.rule.GradleModelAware
import org.codehaus.groovy.ast.ClassNode
import java.security.MessageDigest
import static java.nio.file.Files.isSymbolicLink
@DanielThomas
DanielThomas / gradle-cache.vcl
Last active February 19, 2021 01:04
Varnish Cache Plus (Enterprise) configuration for Gradle HTTP Build Cache
vcl 4.1;
import purge;
import std;
import synthbackend;
sub vcl_recv {
if (req.method != "GET" && req.method != "PUT" && req.method != "DELETE") {
return (synth(405));
}
@DanielThomas
DanielThomas / docker_setup_vpn.sh
Created January 18, 2021 04:00
Docker for Mac M1 Preview VPN workaround
docker_setup_vpn () {
echo "## Previous Configuration"
sudo pfctl -a com.apple.internet-sharing/shared_v4 -s nat 2> /dev/null | tee /tmp/docker_vpn.conf
if sudo pfctl -a com.apple.internet-sharing/shared_v4 -s nat 2> /dev/null | grep 192.168.64.0 | grep -q utun2
then
echo && echo "Not applying change"
else
echo "nat on utun2 inet from 192.168.64.0/24 to any -> (utun2) extfilter ei" >> /tmp/docker_vpn.conf
sudo pfctl -a com.apple.internet-sharing/shared_v4 -N -f /tmp/docker_vpn.conf 2> /dev/null
echo && echo "## New Configuration"