Skip to content

Instantly share code, notes, and snippets.

@Fabax
Fabax / searchreplacedb2.php
Created February 24, 2013 20:53
Wordpress : replace
<?php
/**
*
* Safe Search and Replace on Database with Serialized Data v2.0.1
*
* This script is to solve the problem of doing database search and replace when
* developers have only gone and used the non-relational concept of serializing
* PHP arrays into single database columns. It will search for all matching
* data on the database and change it, even if it's within a serialized PHP
* array.
@Fabax
Fabax / traitementAutotweet.php
Created February 6, 2013 19:19
PHP : AutoTweet traitement
<?php
if(isset($_POST['new_tweet']))
{ #[a-z]#
$random = rand(1,7);
$consumerKey = 'lCZMlvltc7Fy84eOJLh0fg';
$consumerSecret = 'hGVSBcsJYDLtXu4apNOMGM0ec6yBQvGpdCiKGhOChQ';
$oAuthToken = '1020259956-n42wkK3PrBtVBcTR8oWyS8kWg3hcVCfc74aId0P';
$oAuthSecret = 'yPwYJerYxySbj7dSpJBYZ6mv2ZK1i4cOhbrlFSlJJA';
require_once('twitteroauth.php');
@Fabax
Fabax / autotweet.php
Created February 6, 2013 19:19
JS : AutoTweet
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Clichy Tigers</title>
@Fabax
Fabax / csvtoxml.php
Created February 6, 2013 19:17
PHP : csvToXml
<?php
$dirStart = "csv";
//$dirEnd = xml
if ($handle = opendir($dirStart)) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
$splitted = explode('.', $entry);
@Fabax
Fabax / charCount.js
Created February 6, 2013 19:00
Char count
* Character Count Plugin - jQuery plugin
* Dynamic character count for text areas and input fields
* written by Alen Grakalic
* http://cssglobe.com/post/7161/jquery-plugin-simplest-twitterlike-dynamic-character-count-for-textareas
*
* Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
@Fabax
Fabax / traitement winlose
Created February 6, 2013 16:53
traitementwinlose
<?php
// informations twitter
$consumerKey = '6232ltTfgbQobfF7KTw6Gg';
$consumerSecret = 'OP5yeGLSgdmAB1JHerfgRkelFFSMxsWUIxz3oy0s';
$oAuthToken = '621155088-GCelvA9yeTXRzdqp7QTcuO9DjKv0W7nqAqJNJb6Q';
$oAuthSecret = 'NPW9TfOIR81kazfsmyoByDjfJAxdFaBqgEqVqKus';
require_once('twitter/twitteroauth.php');
$tweet = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret);
//information de la DB
@Fabax
Fabax / wii.pde
Created November 22, 2012 12:03
Processing : Class Wii
/* Wii Processing class
* (cc) 2009 Douglas Edric Stanley
* l'Atelier Hypermédia
* l'École supérieure d'art d'Aix-en-Provence
* http://www.ecole-art-aix.fr/
*
* Pour utiliser cette classe il faut :
*
+ Osculator : http://www.osculator.net/