Skip to content

Instantly share code, notes, and snippets.

View czj's full-sized avatar

Clément Joubert czj

View GitHub Profile
@czj
czj / nginx
Created July 17, 2011 10:00
Ubuntu Server 10.04 init.d file for nginx (installed by Passenger)
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@czj
czj / gist:1136385
Created August 10, 2011 08:41
Auto-login for Banque Populaire Ouest
var base_url = "https://www.secure3.banquepopulaire.fr/amserver/UI/Login?realm=ENTAO-ENV00030&goto=https%3A%2F%2Fwww.ibps.ouest.banquepopulaire.fr%3A443%2Fcyber%2Fibp%2Fate%2Fportal%2Finternet.html";
if (window.location != base_url)
{
window.location = base_url;
}
else
{
document.getElementById('IDToken1').value = "";
document.getElementById('IDToken2').value = "";
@czj
czj / gist:1136386
Created August 10, 2011 08:42
Auto-login bookmarklet for Boursorama Banque (site beta août 2011)
if (window.location != 'https://www.boursorama.com/connexion.phtml')
{
window.location = 'https://www.boursorama.com/connexion.phtml';
}
else
{
document.getElementById('login').value = "";
document.getElementById('password').value = "";
document.getElementById('identification').submit();
}
@czj
czj / gist:1149177
Created August 16, 2011 14:11
BNP Paribas almost-automatic login
var url = "https://www.secure.bnpparibas.net/banque/portail/particulier/HomeConnexion?type=homeconnex&identifiant=secure_bnpparibas_net_20021206152735"
if (window.location != url)
{
window.location = url;
}
else
{
// Add your login here
document.logincanalnet.ch1.value = "";
Bonjour,
Nous tenons à vous informer sur quelques changements récents de la structure du flux de données utilisé pour le référencement de vos produits sur ShopMania.
3 nouveaux champs ont été ajoutés au flux de données:
- Frais de port;
- Disponibilité du produit;
- GTIN (UPC/EAN/ISBN) – champ OBLIGATOIRE pour les livres .
@czj
czj / gist:1181760
Created August 30, 2011 19:16
Changements chez Shopmania
Bonjour,
Nous tenons à vous informer sur quelques changements récents de la structure du flux de données utilisé pour le référencement de vos produits sur ShopMania.
3 nouveaux champs ont été ajoutés au flux de données:
- Frais de port;
- Disponibilité du produit;
- GTIN (UPC/EAN/ISBN) – champ OBLIGATOIRE pour les livres .
@czj
czj / gist:1181795
Created August 30, 2011 19:31
Format de fichier Google Shopping France
Cher partenaire,
Nous annonçons aujourd'hui des changements dans nos spécifications techniques de flux pour les pays suivants : France, Angleterre, Allemagne et USA.
L'objectif de ce changement est d'améliorer la qualité de l'information transmise aux internautes de Google. Notre blogpost : http://adwords-fr.blogspot.com/
Vous avez jusqu'au 22 septembre pour faire les changements - au delà de cette date, votre flux ne sera plus validé. Nous vous recommandons de faire ces changements au plus vite.
Les attributs suivants deviennent obligatoires :
- [image link]
- [availability]
# encoding: utf-8
class String
EUROPEAN_ACCENTS = {
['Ã','Ä','Â','À'] => 'A',
['á','à','â','ä','ã'] => 'a',
['Ë','É','È','Ê'] => 'E',
['é','è','ê','ë'] => 'e',
['Î','Ì'] => 'I',
['í','ì','î','ï'] => 'i',
['Õ','Ö','Ô','Ò'] => 'O',
@czj
czj / sabnzdb_upgrade.sh
Created September 27, 2011 09:40
SABnzdb+ auto-update script
#!/bin/bash
cd ~/bin
API_KEY=`cat SABnzbd/sabnzbd.ini | grep ^api_key | awk '{print $3}'`
PORT=` cat SABnzbd/sabnzbd.ini | grep ^https_port | awk '{print $3}'`
VERSION=`curl -s http://sabnzbdplus.sourceforge.net/version/latest | head -n1`
VERSION=${VERSION%?}
DIR="SABnzbd-${VERSION}"
GZ="${DIR}-src.tar.gz"
@czj
czj / gist:1251031
Created September 29, 2011 15:43
.irbrc that runs Pry instead of IRB
# This script comes from Pry Everywhere by Luca Pette
# http://lucapette.com/pry/pry-everywhere/
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953
if defined?(::Bundler)
global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first
if global_gemset
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*")
all_global_gem_paths.each do |p|
gem_path = "#{p}/lib"