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
package main | |
/** This is a rewrite of the PHP ua-classifier in golang | |
* https://github.com/phlib/ua-classifier/blob/master/src/Classifier.php | |
*/ | |
import ( | |
"strings" | |
"github.com/ua-parser/uap-go/uaparser" | |
) |
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
# --- RSS TRACKING | |
location ~ /ga_proxy_track\.gif { | |
set $mainDomain 'frandroid.com'; | |
set $cid $cookie__ga_cid; | |
if ($cid = '') { | |
#set $cid "$request_id"; # only nginx 1.2.7 | |
set $cid "$pid-$date_local"; | |
} | |
add_header Set-Cookie "_ga_cid=$cid; path=/; domain=.$mainDomain"; | |
set $uip "$remote_addr"; #x_forwarded_for |
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 | |
URL=$1 | |
ITERATION=100 | |
T1NAME=time_connect | |
T2NAME=time_starttransfer | |
T3NAME=time_total | |
T1=0 |
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
<?php | |
/* | |
PHP template to ask a recapcha challenge, present it to a user. | |
*/ | |
<?php | |
class BustRecapcha { |
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
<?php | |
// CONFIG | |
$servers = array( | |
array('Local', '127.0.0.1', 6379), | |
); | |
// END CONFIG | |
$server = 0; | |
if (isset($_GET['s']) && intval($_GET['s']) < count($servers)) { | |
$server = intval($_GET['s']); |
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
<?php | |
// This log on CJ platform, get some info (account number) and construct a link with it. | |
// Licence: Beerware | |
class CJDeepLink { | |
var $uname; | |
var $pw; | |
var $pub; | |
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
<?php | |
// Copyright from https://github.com/rtrompier/Zanox-Deeplink-API | |
// Updated and corrected | |
class ZanoxDeepLink{ | |
var $dataConnection; | |
var $dataDeepLink; | |
var $redirectUrl; | |
var $cookieFile; |
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
function sendMessage($title, $url){ | |
$content = array( | |
"en" => $title, | |
"fr" => $title | |
); | |
$fields = array( | |
'app_id' => ONESIGNAL_APP_ID, | |
'included_segments' => array('All'), | |
'url' => $url, |
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
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
syntax on | |
set number | |
#set background=dark | |
#colorscheme solarized |
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 | |
# -*- coding: utf-8 -*- | |
import requests | |
from lxml import html | |
import sys | |
def sum_avg_max(images): | |
total = sum(s for url, s in images) |