Skip to content

Instantly share code, notes, and snippets.

View btorch's full-sized avatar

Marcelo Martins btorch

  • Fortaleza
View GitHub Profile
@btorch
btorch / ParadoxPythonExample.py
Created June 6, 2019 18:55 — forked from anthonyeden/ParadoxPythonExample.py
Paradox Database: Connect & Query in Python
# A sample script to create a temporary copy of a Paradox database, connect to it, and query it.
# Requires PyPyODBC: https://pypi.python.org/pypi/pypyodbc
# Written by Anthony Eden - http://mediarealm.com.au/
import os
import shutil
import pypyodbc
@btorch
btorch / ks-1404minimalvm.cfg
Created December 9, 2015 15:57 — forked from vrillusions/_README.mkd
Kickstart for Ubuntu 14.04
#
#Generic Kickstart template for Ubuntu
#Platform: x86 and x86-64
#
# Customized for Server 14.04 minimal vm install
#
# Usage:
# - Look through config for any changes you want to do. You may want to change
# the initial admin user. Currently username is ubuntu and password is
# ChangeMe. Also may want to change the list of installed packages. Tried to
@btorch
btorch / setup_kiosk.sh
Created December 9, 2015 15:50 — forked from anonymous/setup_kiosk.sh
create a kiosk user
#!/bin/bash
# This script
# - creates a user (named below)
# - sets up a union (aufs) filesystem on top of the users immutable home
# - creates a cleanup script (/usr/local/bin/cleanup.sh) that empties the aufs
# layer on login/logout/boot
# - replaces the lightdm config
# - replaces rc.local to run the script
#
export LC_ALL="en_US.UTF-8"
salt-call -l warning state.highstate
sed -i 's/precise/trusty/' /etc/apt/sources.list
rm /etc/apt/sources.list.d/saltstack.list && sudo apt-get update
apt-get update >/tmp/apt.out 2>/tmp/apt.error
update-rc.d haproxy disable ; update-rc.d quagga disable
update-rc.d bird disable ; update-rc.d bird6 disable
TC shaping:
http://www.cyberciti.biz/faq/linux-traffic-shaping-using-tc-to-control-http-traffic/
http://www.convert-me.com/en/convert/data_transfer_rate/
http://lartc.org/howto/lartc.ratelimit.single.html
http://lartc.org/howto/lartc.qdisc.filters.html#LARTC.FILTERING.SIMPLE
http://lartc.org/howto/lartc.qdisc.classful.html
http://blog.edseek.com/~jasonb/articles/traffic_shaping/scenarios.html
http://man.cx/tc-htb(8)
http://man.cx/tc
@btorch
btorch / Dockerfile
Last active August 29, 2015 14:07 — forked from astraw/Dockerfile
# Build this docker image with:
#
# sudo docker build .
#
# Take note of the <image_id>, which will be the output above in the
# form "Successfully built <image_id>". Now, run the IPython web
# notebook with:
#
# sudo docker run -p 8889:8889 <image_id>
#
@btorch
btorch / irssi
Created September 25, 2014 17:01
https://pthree.org/2010/02/02/irssis-channel-network-server-and-connect-what-it-means/
Helpful Referecens that I use all the time
- http://salt.readthedocs.org/en/v0.17.5/ref/modules/all/ (builtin execution modules)
- http://salt.readthedocs.org/en/v0.17.5/ref/states/all/ (builtin state modules)
Note: Change the version above on the URL accordingly
builtin execution modules:
Those I normally used when executing a salt cli command such as the examples below
.bashrc
------
if [ -S "$SSH_AUTH_SOCK" ] && [ ! -h "$SSH_AUTH_SOCK" ]; then
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock