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
// ==UserScript== | |
// @name MeFirefox | |
// @namespace MyDebian | |
// @description Change All fonts across FF | |
// @include http* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var css = "h1, h2, h3, h4, h5, h6, #firstHeading,.pod_body, #lst-ib, td, body, html, p, tr, div, a, main-body, textarea {font-family: 'Futura BT', sans-serif !important;} strong, b {font-weight: 900;}", |
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 | |
// Supprimer les caractères de contrôle | |
$texte = preg_replace('/[[:cntrl:]]/', '', $texte); |
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 docReady() { | |
alert('ok'); | |
} | |
if (typeof window.addEventListener === 'function') { | |
window.addEventListener('DOMContentLoaded', docReady, false); | |
} else { | |
window.onload = function() { docReady(); }; | |
} |
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 -O | |
# | |
# Quick And Dirty Python Background Changer | |
# | |
# Designed for Ubuntu Precise 12.04 | |
# | |
# Please install beautifulsoup python module first : | |
# sudo aptitude install python-beautifulsoup | |
# |
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
/** | |
* Fonction permettant d'ouvrir une popup centrée | |
* aux dimensions souhaitées. | |
* | |
* @param string url de la page à ouvrir. | |
* @param int largeur de la fenêtre | |
* @param int hauteur de la fenêtre | |
*/ | |
function OuvrirFenetrePopup(pageURL, w, h) | |
{ |
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 | |
/** | |
* Classe de connexion à la Freebox. | |
* | |
* N'hésitez pas à la surclasser pour définir vos propres méthodes s'appuyant | |
* sur celles qui sont présentes ici. | |
* | |
* Exemple d'utilisation : | |
* <?php | |
* require('freebox_client.class.php'); |
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 | |
// Ce coup-ci, on va avoir besoin de la librairie OAuth | |
include_once "../../library/OAuthStore.php"; | |
include_once "../../library/OAuthRequester.php"; | |
$error = $_GET['error']; | |
$code = $_GET['code']; | |
// Il faut reprendre l'URL exacte avec laquelle cette page a été appelée. | |
$redirect_uri = 'http://monsite.com/callback_facebook.php'; |
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 | |
// Inclusions idem que l'exemple précédent. | |
// L'API jetera une exception en cas de problème, cela sera notamment le cas | |
// si l'internaute a choisi de refuser de partager ses informations. | |
try { | |
// Comme la dernière fois, on instancie l'objet de connexion avec les | |
// informations de connexion. | |
$options = array('consumer_key' => TWITTER_CONSUMER_KEY, 'consumer_secret' => TWITTER_CONSUMER_SECRET); |
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 | |
include('openid.php'); | |
// Rebelote | |
$openid = new LightOpenID('mon.site.fr'); | |
// On doit être dans le contexte d'un retour de connexion | |
// cette variable sera remplie si c'est le cas. | |
if($openid->mode) { |
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
/** | |
* API "statique" minimaliste d'accès à l'API FlickR via JSONP. | |
* Elle repose sur jQuery notamment pour les requêtes Ajax. | |
* L'accès se fait par la méthode "interrogation()". | |
*/ | |
var ApiFlickr = { | |
/** | |
* URL du service d'API FlickR. | |
* @private |
NewerOlder