Skip to content

Instantly share code, notes, and snippets.

View thimslugga's full-sized avatar
🏠
Working from home

adam kaminski thimslugga

🏠
Working from home
View GitHub Profile
@thimslugga
thimslugga / netflow_asa.yaml
Created October 10, 2015 00:19 — forked from msheiny/netflow_asa.yaml
Logstash netflow codec description for Cisco ASA
---
148:
- 4
- :conn_id
8:
- :ip4_addr
- :ipv4_src_addr
7:
- 2
- :src_port
@thimslugga
thimslugga / Linux Static IP
Last active December 30, 2016 21:08 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@thimslugga
thimslugga / callable.py
Created January 12, 2017 16:19 — forked from durden/callable.py
Clever way to use Python __call__ and __getattr__ to create web APIs that can map directly (dynamically) to actual API
class MyCallable(object):
def __init__(self, urlparts, callable):
self.urlparts = urlparts
self.callable = callable
def __call__(self, **kwargs):
print kwargs
print self.urlparts
def __getattr__(self, name):
# Return a callable object of this same type so that you can just keep
# chaining together calls and just adding that missing attribute to the
@thimslugga
thimslugga / gist:487819ab4cace55a6dcb8606df4797d6
Created January 19, 2017 19:16 — forked from luginbash/gist:ffd9ec4c9f9e80cb57be
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
ip access-list extended cp-any-any
permit ip any any
ip access-list extended cp-dns
permit udp host 66.230.128.14 eq domain any
permit udp host 66.230.128.18 eq domain any
ip access-list extended cp-fragments
permit ip any any fragments
@thimslugga
thimslugga / iperf.service
Created February 1, 2017 20:15 — forked from mmasaki/iperf.service
systemd service unit for iperf
# /etc/systemd/system/iperf.service
[Unit]
Description=iperf server
After=syslog.target network.target auditd.service
[Service]
ExecStart=/usr/bin/iperf -s
[Install]
WantedBy=multi-user.target
@thimslugga
thimslugga / guacamole install on ubuntu 16.04
Last active October 6, 2022 17:58 — forked from cyrex562/guacamole install on ubuntu 16.04
guacamole install on ubuntu 16.04
# install required packages
apt -y update && apt-get -y dist-upgrade
add-apt-repository ppa:webupd8team/java
apt -y update
apt -y install libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev \
libvncserver-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev git build-essential autoconf libtool oracle-java8-installer tomcat8 \
tomcat8-admin tomcat8-common tomcat8-docs tomcat8-user maven postgresql-server-dev-9.5 postgresql-common postgresql-9.5 libpulse-dev \
libvorbis-dev freerdp ghostscript wget pwgen
# create directories & files
@thimslugga
thimslugga / ipv4.py
Created July 25, 2017 19:12 — forked from cslarsen/ipv4.py
Two small Python functions to convert IPv4 address to integer and vice-versa
#!/usr/bin/env python
"""Functions to convert IPv4 address to integer and vice-versa.
Written by Christian Stigen Larsen, http://csl.sublevel3.org
Placed in the public domain by the author, 2012-01-11
Example usage:
$ ./ipv4 192.168.0.1 3232235521
192.168.0.1 ==> 3232235521
@thimslugga
thimslugga / install_pip_suse11.sh
Created November 21, 2017 21:06 — forked from nascimento/install_pip_suse11.sh
Install pip on suse 11 and python 2.6
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
zypper install python-setuptools
python setup.py install
ln -sfn /usr/local/bin/pip /usr/bin/pip
pip install --upgrade awscli
cd ..
@thimslugga
thimslugga / install_golang.sh
Created December 13, 2017 15:19 — forked from rivy/install_golang.sh
Install Golang on Linux
#!/bin/bash
## Install Golang 1.6.2 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS)
## http://www.linuxpro.com.br/2015/06/golang-aula-1-instalacao-da-linguagem-no-linux.html
## Run as root (sudo su)
## Thank's **Bruno Albuquerque bga at bug-br.org.br**
GO_URL="https://storage.googleapis.com/golang"
GO_VERSION=${1:-"1.6.2"}
GO_FILE="go$GO_VERSION.linux-amd64.tar.gz"