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
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
/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
#!/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 |
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
#ifdef SHELL | |
gcc $0 && ./a.out | |
gcc -DNDEBUG $0 && ./a.out | |
exit 0 | |
#endif | |
#include <stdio.h> | |
#ifndef NDEBUG | |
#define DEBUG(fmt, arg...) \ |
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
#ifdef SHELL | |
gcc $0 -g -Wall -Werror && valgrind -q ./a.out | |
exit 0 | |
#endif | |
#include <stdio.h> | |
int main( int argc, char * argv [] ) { | |
int i; | |
for(; i < 10; i++ ) { |
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
#ifdef SHELL | |
gcc $0 && ./a.out | |
gcc -m32 $0 && ./a.out | |
exit 0 | |
#endif | |
#include <stdio.h> | |
void nb1() { | |
char * str = "999999999999"; |
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
#ifdef SHELL | |
gcc -Wall -Werror $0 && ./a.out 10 | |
exit 0 | |
#endif | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main( int argc, char * argv [] ) { | |
int size = atoi(argv[1]); |