Skip to content

Instantly share code, notes, and snippets.

View sfunk1x's full-sized avatar

sfunk1x sfunk1x

View GitHub Profile
### Keybase proof
I hereby claim:
* I am sfunk1x on github.
* I am sfunk1x (https://keybase.io/sfunk1x) on keybase.
* I have a public key ASD_G7pshZYhbbRA13nO65HiDhruLpu6JHxWozclPAWM2go
To claim this, I am signing this object:
@sfunk1x
sfunk1x / ovpn-writer.sh
Last active November 29, 2017 13:51
Script to generate an OpenVPN client configuration file in the unified format
#!/bin/sh
##
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET SERVER_CIPHER HMAC_AUTH_DIGEST > client.ovpn
##
## Example invocation (note it must be run as root since key and cert files are protected
## ./ovpn-writer.sh sub.sub.domain /etc/easy-rsa/pki/ca.crt /etc/easy-rsa/pki/issued/client.crt /etc/easy-rsa/pki/private/client.key /etc/openvpn/ta.key aes-256-cbc sha512 > android.ovpn
##
## Tested and works with OpenVPN for Android 0.6.57 on Android 6.0.1
##
@sfunk1x
sfunk1x / upgrade-postgres-9.3-to-9.5.md
Created June 20, 2016 14:26 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main

Keybase proof

I hereby claim:

  • I am sfunk1x on github.
  • I am sfunk1x (https://keybase.io/sfunk1x) on keybase.
  • I have a public key whose fingerprint is D4C0 5154 58CE E6CA C9B6 5C54 3CFC 0F69 F88E 3044

To claim this, I am signing this object:

@sfunk1x
sfunk1x / keybase.md
Created December 24, 2014 22:52
I am sfunk1x

Keybase proof

I hereby claim:

  • I am sfunk1x on github.
  • I am sfunk1x (https://keybase.io/sfunk1x) on keybase.
  • I have a public key whose fingerprint is D309 E607 8A2F B0B3 A4A6 C836 D324 F77B B68E 5684

To claim this, I am signing this object:

package com.foocoders.text;
import java.text.AttributedCharacterIterator;
import java.text.DateFormatSymbols;
import java.text.FieldPosition;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;