This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import pycassa | |
import datetime | |
import json | |
# This is a basic (and yet generic) implementation of time series using pycassa | |
class TimeSerie: | |
def __init__(self, keyspace, subject, sys=None): | |
# To make things easier, we can create the keyspace and column families ourself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/logrotate.d/00-default-parameters | |
weekly | |
rotate 12 | |
create | |
compress | |
delaycompress | |
dateext | |
compresscmd /usr/bin/xz | |
uncompresscmd /usr/bin/unxz | |
compressext .xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifeq "$(PREFIX)" "" | |
PREFIX=/usr | |
endif | |
ifeq "$(DESTDIR)" "" | |
DESTDIR=/ | |
endif | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<properties> | |
<property name="name">app</property> | |
<property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5.5p | %-10.10t | %-20.20C:%-5.5L | %msg%n</property> | |
<!-- | |
It will look like that: | |
2013-04-03 07:37:51.993 | WARN | main | lnetgateway.Server:56 | My app is logging stuff | |
--> | |
</properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Quick IP banning script | |
# This is a very simple and effective way to ban IP address from any kind of webapp. | |
# | |
# * To ban an IP for two minutes | |
# echo "120" >/tmp/iptables-banip/1.2.3.4 && /usr/local/bin/banip | |
# | |
# * To bypass the ban timeout and unban an IP sooner | |
# echo "0" >/tmp/iptables-unbanip/1.2.3.4 && /usr/local/bin/banip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/bin/expect >/dev/null <<EOF | |
set password mypassword | |
set key mykey.pub | |
spawn ssh-add /home/user/.ssh/$key | |
match_max 100000 | |
expect ":" | |
send -- "$password\r" | |
expect eof | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Java install | |
hosts: do | |
user: root | |
tasks: | |
- name: Create java repo list | |
action: shell echo 'deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main' >/etc/apt/sources.list.d/java.list | |
- name: Add repo key | |
action: command apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 | |
- name: Accept java license | |
action: shell echo 'oracle-java7-installer shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sample config file | |
[do] | |
198.199.74.236 tinc_ip=10.1.1.1 hostname=ca_1_1 tinc_connectto=ca_2_2 | |
192.34.60.13 tinc_ip=10.1.1.2 hostname=ca_1_2 tinc_connectto=ca_1_1 | |
198.199.70.163 tinc_ip=10.1.1.3 hostname=ca_1_3 tinc_connectto=ca_1_2 | |
198.199.71.204 tinc_ip=10.1.2.1 hostname=ca_2_1 tinc_connectto=ca_1_3 | |
198.199.70.208 tinc_ip=10.1.2.2 hostname=ca_2_2 tinc_connectto=ca_2_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
wifite | |
author: derv82 at gmail | |
Licensed under the GNU General Public License Version 2 (GNU GPL v2), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
JETTY_VERSION=9.0.5.v20130815 | |
# We reset everything | |
rm -Rf jetty-distribution-${JETTY_VERSION} jetty | |
# We prepare the dirs | |
mkdir -p jetty/opt jetty/etc/init.d jetty/etc/default jetty/DEBIAN |
OlderNewer