Skip to content

Instantly share code, notes, and snippets.

View luginbash's full-sized avatar
😀

Luginbash luginbash

😀
View GitHub Profile
@luginbash
luginbash / gist:5377411
Created April 13, 2013 07:05
So a gist is like a versioned twitter?
Or more like a blog?
It's crazy that someone's using 8 space tabs indentation!
@luginbash
luginbash / FSL installer patch to support zsh
Created May 12, 2014 05:42
FSL doesn't support zsh by default, so I patched it for installation.
@@ -1066,6 +1066,7 @@ class FslInstall(object):
shells['ksh'] = '.profile'
shells['csh'] = '.cshrc'
shells['tcsh'] = '.cshrc'
+ shells['zsh'] = '.zshrc'
shellmap = {}
shellmap['bash'] = 'sh'
@@ -1073,6 +1074,7 @@ class FslInstall(object):
shellmap['tcsh'] = 'csh'
@luginbash
luginbash / gist:ffd9ec4c9f9e80cb57be
Created July 15, 2014 05:16
Console log for ocserv configuration
# Please edit /etc/default/ufw first
# DEFAULT_FORWARD_POLICY="ACCEPT"
# then at /etc/ufw/sysctl.conf
# net/ipv4/ip_forward=1
# net/ipv6/conf/default/forwarding=1
# allow mtu dectection
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
@luginbash
luginbash / .zshrc
Created July 21, 2014 01:53
~/.zshrc
# GNU/Octave 3.8.0
alias octave='/usr/local/octave/3.8.0/bin/octave-3.8.0'
# change editor to use sublime
export EDITOR=lime
export VISUAL=lime
# Source Prezto.
@luginbash
luginbash / example.ocserv.conf
Created July 21, 2014 02:00
Example OpenConnect Server configuration
auth = "plain[/etc/ocserv/ocpasswd]"
max-clients = 16
max-same-clients = 5
tcp-port = 443
udp-port = 443
keepalive = 32400
dpd = 90
mobile-dpd = 1800
try-mtu-discovery = true
server-cert = /etc/ssl/certs/server-cert.pem
@luginbash
luginbash / libDebian.sh
Created July 21, 2014 02:03
Functions I used to deploy a Debian server.
#!/bin/bash
#
# debian deployment script base, this script does nothing itself.
#
###########################################################
# System
###########################################################
function updateSystem {
apt-get update
@luginbash
luginbash / ocsetup.sh
Last active December 13, 2018 06:05
setting up ocserv (open source AnyConnect alternative) on a new Debian, use passwd auth by default
echo "this file isn't supposed to run"
exit 0
# <------------------------------ Enviroment Variables ------------------------------->
FQDN = <Server DNS Name> # can also get from PTR record
ORG_NAME = <Org name>
RELEASE_NAME = $(lsb_release -sc)
# <------------------------------ Network Stack Setups ------------------------------->
# Please edit /etc/default/ufw first
@luginbash
luginbash / .zshrc
Created October 17, 2014 08:15
shell profile
# Global
setopt no_nomatch # if there are no matches for globs, leave them alone and execute the command
setopt no_cdable_vars # don't use named directories in cd autocompletion
setopt rmstarsilent # no more prompts in rm
# Intel ICC
PATH="/opt/intel/composerxe/bin:$PATH"
export PATH
@luginbash
luginbash / ocserv.conf
Last active August 29, 2015 14:07
OpenConnect Server Configuration
auth = "certificate"
ca-cert = /etc/ocserv/ca.pem
server-cert = /etc/ocserv/sfo3.pem
server-key = /etc/ocserv/sfo3.key
dh-params = /etc/ocserv/dh.pem
tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%NORMAL:-VERS-SSL3.0:-EXPORT"
predictable-ips = true
compression = true
max-clients = 16
max-same-clients = 5