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
server { | |
listen 80; | |
server_name localhost; | |
# ... other default site stuff, document root, etc. ... | |
location ~ ^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ { | |
alias /home/chroot/home/$userdir_user/public_html$userdir_uri; | |
index index.html index.htm index.php; | |
autoindex on; |
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
<script type="text/javascript"> | |
var myJson = new Array(); | |
$(document).ready(function() { | |
// Pas en asynchrone pour le dev (debug) | |
/*$.ajaxSetup({ | |
async: false | |
}); | |
*/ |
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
$app->register(new Silex\Provider\TranslationServiceProvider(), array( | |
'locale_fallbacks' => array('en'), | |
)); | |
$app->register(new Silex\Provider\FormServiceProvider()); | |
$form = $app['form.factory']->createBuilder('form') | |
->add('name') | |
->add('email') | |
->add('gender', 'choice', array( | |
'choices' => array(1 => 'male', 2 => 'female'), |
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
#paste these lines in /etc/network/interfaces | |
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
auto wlan0 | |
iface wlan0 inet dhcp | |
wpa-ssid your-ssid-here |
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
# put the following content in /etc/network/interfaces | |
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
auto wlan0 | |
iface wlan0 inet manual | |
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf |
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 | |
# Brahim MACHKOURI | |
import subprocess | |
import re | |
import urllib2 | |
# recupere la page web de webmin dediee a debian | |
response = urllib2.urlopen('http://www.webmin.com/deb.html') | |
html = response.read() |
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/bash | |
server1="keyserver.ubuntu.com" | |
server2="keyserver.debian.com" | |
server3="keys.gnupg.net" | |
function replacehkp { | |
sedserver=`echo $1 | awk -F '.' '{ print $1 "\\\." $2 "\\\." $3 }'` | |
grep -ri "'$server" * | awk -F ':' '{ print $1 }' | xargs sed -i "s/'$sedserver/'hkp:\/\/$sedserver:80/g" | |
} |
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
export PS1="\[\e[00;33m\]\A\[\e[0m\]\[\e[00;37m\] \[\e[0m\]\[\e[00;34m\]\u\[\e[0m\]\[\e[00;37m\] [\H] \[\e[0m\]\[\e[00;31m\]\w\[\e[0m\]\[\e[00;37m\]\n\[\e[0m\]\[\e[00;32m\]\\$\[\e[0m\]\[\e[00;37m\] \[\e[0m\]" |
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/env python | |
# encoding: utf-8 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" | |
access_key = "" |
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/env python | |
# A small script for cdp devices discovery | |
import sys | |
import pcapy | |
import socket | |
from dpkt import ethernet | |
from dpkt import cdp | |
from docopt import docopt |
OlderNewer