Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am zerlgi on github.
  • I am zerlgi (https://keybase.io/zerlgi) on keybase.
  • I have a public key whose fingerprint is FACD C0B8 940D C9A8 6F27 135E 9A72 8359 BBCD 41CB

To claim this, I am signing this object:

# Function to calculate the WPS checksum of a 7 digit number
def wps_checksum(pin):
accum = 0
while pin>0:
accum += 3 * (pin % 10);
pin /= 10;
accum += pin % 10;
pin /= 10;
return (10 - accum % 10) % 10
# Get the actual url from http://www.oracle.com/technetwork/java/index.html
# And replace the download.oracle.com portion from the below string.
# http://stackoverflow.com/questions/10268583
# sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
#JDK8u5:
sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-apidocs.zip"
sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-windows-x64.exe"
sudo wget --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-windows-i586.exe"
#!/usr/bin/expect -f
#
# VIPAccess.exp
#
# Command-line emulation of Symantec's VIP Access software token.
# Usage:
# ./VIPAccess.exp [v]
# If the "v" argument (or any argument) is specified, verbose output
# will be produced on stderr. The OTP value will be output on stdout.
#
# Dockerfile snippets that are useful to me. Many bits obtained from others.
FROM ubuntu:14.04
MAINTAINER Andrew Mac <zerlgi@gmail.com>
RUN echo 'Acquire::http::Proxy "http://172.17.42.1:3142"; ' > /etc/apt/apt.conf
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty-security main universe" >> /etc/apt/sources.list
#RUN echo "deb http://archive.ubuntu.com/ubuntu trusty-updates main universe" >> /etc/apt/sources.list
RUN apt-get -qq update