Skip to content

Instantly share code, notes, and snippets.

View asmaps's full-sized avatar

Arne Schauf asmaps

View GitHub Profile
@asmaps
asmaps / install-salt-minion.sh
Last active July 15, 2017 16:48
Debian Wheezy install salt-minion
echo "deb http://debian.saltstack.com/debian wheezy-saltstack main" >> /etc/apt/sources.list.d/salt.list
wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add -
aptitude update
aptitude install salt-minion
echo "master: salt.as-webservices.de" >> /etc/salt/minion
service salt-minion restart
@asmaps
asmaps / freeze.txt
Created March 6, 2014 12:39
pip freeze
(cms)cms@cms-1:~/src$ pip freeze
Django==1.6.2
Pillow==2.3.0
South==0.8.4
argparse==1.2.1
-e git+https://github.com/maccesch/cmsplugin-contact.git@356e7ae923a76be746f57af1cedb725f226dade3#egg=cmsplugin_contact-master
-e git+https://github.com/stefanfoulis/cmsplugin-filer.git@65dfc7b5e748046f0c4e888b294c2caf5502c86a#egg=cmsplugin_filer-origin/develop
cmsplugin-gallery-filer==0.5.2.1
dj-database-url==0.2.2
django-admin-jqueryui==1.8.22
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
var left = new Event("keydown");
left.which = 37;
var up = new Event("keydown");
up.which = 38;
var right = new Event("keydown");
right.which = 39;
@asmaps
asmaps / ax_minion_setup.sh
Last active August 29, 2015 14:00
Aexea salt minion setup script
echo "adding salt repositories..."
add-apt-repository ppa:saltstack/salt
echo "installing salt minion locally..."
aptitude update
aptitude install -y salt-minion
echo "enter minion_id. To keep default (hostname) just hit [ENTER]:"
read minion_id
if [ ! -z $minion_id ]; then
texttest.org
https://github.com/kopf/facebewk
https://github.com/aaugustin/django-c10k-demo
https://github.com/isaacbernat/pycrastinate
https://github.com/spotify/dh-virtualenv
cookie-cutter
http://alpha.quantifiedcode.com
twisted names
https://github.com/d0ugal #homeautomation
@asmaps
asmaps / gist:fb8cb97675e7aef6bcde
Created July 26, 2014 10:36
/usr/share/X11/xorg.conf.d/52-custom-synaptics.conf
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
# disable synaptics driver pointer acceleration
Option "MinSpeed" "1"
Option "MaxSpeed" "20"
# tweak the X-server pointer acceleration
Option "AccelerationProfile" "2"
Option "AdaptiveDeceleration" "10"
@asmaps
asmaps / gist:7603e51a73f04dc56c8d
Created January 14, 2015 13:00
sync_to_s3_with_boto.py
#! /usr/bin/env python
# coding=utf-8
import os
import sys
import boto
import boto.s3
from boto.s3.key import Key
asmaps@asmaps-x240 ~/tmp % cat test.py
d = {
'bla': [['a', 'b', 'bla', 'c'], ['d', 'e', 'bla']],
'foo': [['a', 'b', 'foo', 'c'], ['d', 'e', 'foo']],
}
for key, value in d.iteritems():
for l in value:
l.remove(key)
asmaps@asmaps-x240 ~/tmp % cat test.py
import requests
import json
r = requests.get(
'https://s3-eu-west-1.amazonaws.com/uploads-eu.hipchat.com/81297/1708406/kh8jkvVIW8FnZeU/synonymdb.json')
d = json.loads(r.content)
for key, value in d.iteritems():
@asmaps
asmaps / gist:a25d5dba88060dea955b
Created July 27, 2015 14:32
DTAG - läuft...
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. 10.42.2.1 0.0% 29 1.8 2.8 1.8 5.4 0.9
2. 192.168.100.2 0.0% 29 0.6 0.5 0.4 0.6 0.0
3. 217.5.98.13 14.3% 29 96.3 101.5 95.7 150.1 10.8
4. 217.237.152.62 28.6% 29 161.4 166.3 161.4 174.9 3.4
5. hh-ea7-i.HH.DE.NET.DTAG.DE 25.0% 29 159.1 164.5 159.1 169.8 2.3
6. 80.150.170.98 48.3% 29 162.1 162.5 158.3 167.7 2.2
7. 209.85.249.124 28.6% 29 159.8 226.4 157.1 1439. 285.5
8. 72.14.233.216 39.3% 29 161.8 162.4 158.0 165.9 2.1