Skip to content

Instantly share code, notes, and snippets.

@maxisoft
maxisoft / proxy.txt
Created June 30, 2012 14:02
test proxy
190.26.91.173:3128
195.142.109.234:80
180.248.156.243:8080
190.9.128.96:80
78.188.31.151:80
202.75.54.154:3128
118.96.31.91:3128
186.153.120.42:8080
<?php
final class Constantes
{
public static $db = null;
}
/**
* @return mysqli
*/
function md_bd_connection()
@maxisoft
maxisoft / period.c
Created May 7, 2013 06:43
If in preprocessor close after dup 2
#define forever for(;;)
#define THREAD_SLEEP_TIME 100000 //0.1 sec
#define THREAD_MUTEX_WAIT_TIME 10000 //0.01 sec
#define LOG_UNCATCHED_SIGNAL 1 // 1 => crée un fichier period.signals.log et log les signaux qui ne sont pas dans CATCHED_SIGNAL
#define LOCK_FILE_STR "/tmp/period.lock"
#if LOG_UNCATCHED_SIGNAL
#define SIGNAL_LOG_FILE_STR "/tmp/period.signals.log"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#define forever for(;;)
#define NBR_LETTRE 26
#define INDICE_COINCIDENCE .0746
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
How to :
Replace the Header value with yours,
open a browser tab and open the javascript console ("alt+caps+j") then type:
console.log(navigator.userAgent)
copy the resulting ligne
@maxisoft
maxisoft / .bashrc
Created November 10, 2013 18:13
exemple .bashrc et .profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
package fr.ufc.l3info.mcoo.statecharts.utils;
import java.util.ArrayList;
import java.util.List;
public class OldTree<T>{
private List<OldTree<T>> children = new ArrayList<OldTree<T>>();
private OldTree<T> parent;
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <limits.h>
#include <string.h>
#include <math.h>
#include <sys/stat.h>
import cherrypy
import sqlite3
import os
class Message(object):
@cherrypy.expose
def add(self, pseudo_dest, message, Send):
if not cherrypy.session.get('logged'):
raise cherrypy.HTTPRedirect("../login")
import cherrypy
import sqlite3
import os
import cgi
import uuid
import time
class Token(object):
MAX_TIME = 5 * 60 # 5 minute