Skip to content

Instantly share code, notes, and snippets.

View nicolas-t's full-sized avatar
🦏
opensourcing

Nicolas Turlais nicolas-t

🦏
opensourcing
View GitHub Profile
// ==UserScript==
// @name die die die
// @namespace twi-
// @include https://twitter.com/
// @include http://twitter.com/
// @version 1
// @require http://code.jquery.com/jquery-1.11.0.min.js
// @grant none
// ==/UserScript==
@nicolas-t
nicolas-t / leboncoin.php
Last active August 29, 2015 14:05
Receive an email when a new item pops at Leboncoin.fr
<?php
/* ******************************************************************************* */
/* Script to track search results on leboncoin */
/* Receive an email when a new item pops */
/* ******************************************************************************* */
/* ******************************************************************************* */
// - Add this cron job to check for new items every 30 minutes */
// */30 * * * * curl http://yoursite.com/leboncoin.php */
var result=-10000;
function recur(index,sum,stair){
/*global result <-- python shit baby*/
if((index == (stair.length-1) || index == (stair.length-2)) && (result< sum))
result = sum;
if(index+1 < stair.length)
recur(index+1, sum + stair[index+1],stair);
if(index+2 < stair.length)
recur(index+2, sum + stair[index+2],stair);
<script>
/*variables*/
var stair = [], routes = [], retours = [], sommes = [], result = false;
/*functions*/
function recur(index,parc){
if(index == (stair.length-1) || index == (stair.length-2) ){
retours.push(parc);
}
if(index+1 < stair.length){
@nicolas-t
nicolas-t / gist:4245929
Created December 9, 2012 16:34
Chocolat
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.chocolat.js"></script>
<link rel="stylesheet" href="css/chocolat.css" type="text/css" media="screen" charset="utf-8">
@nicolas-t
nicolas-t / gist:4245938
Created December 9, 2012 16:36
Chocolat
<a href="series/1.jpg" rel="Titre de la série" title="Légende de l'image 1"><img width="100" src="series/mini/1.jpg" /></a>
<a href="series/2.jpg" title="Légende de l'image 2"><img width="100" src="series/mini/2.jpg" /></a>
<a href="series/3.jpg" title="Légende de l'image 3"><img width="100" src="series/mini/3.jpg"/></a>
@nicolas-t
nicolas-t / gist:4245948
Last active October 13, 2015 19:38
Chocolat
$(document).ready(function(){
$('selector').Chocolat({
displayAsALink: true,
linkImages : true
});
});
@nicolas-t
nicolas-t / gist:4245989
Created December 9, 2012 16:44
Chocolat
<p id="demo">
<a href="series/gouttes/1.jpg" rel="Title photoset" title="Caption image 1"><img src="series/gouttes/mini/1.jpg" width="100"></a>
<a href="series/gouttes/2.jpg" title="Caption image 2"><img src="series/gouttes/mini/2.jpg" width="100"></a>
<a href="series/gouttes/3.jpg" title="Caption image 3"><img src="series/gouttes/mini/3.jpg" width="100"></a>
</p>
@nicolas-t
nicolas-t / gist:4245992
Created December 9, 2012 16:45
Chocolat
<ul id="linksContainer"></ul>
<p id="demoA">
<a href="series/inerte/1.jpg" rel="Title photoset 1" title="Caption image 1"></a>
<a href="series/inerte/2.jpg" title="Caption image 2"></a>
<a href="series/inerte/3.jpg" title="Caption image 3"></a>
</p>
<p id="demoB">
<a href="series/gouttes/1.jpg" rel="Title photoset 2" title="Caption image 1"></a>
<a href="series/gouttes/2.jpg" title="Caption image 2"></a>
<a href="series/gouttes/3.jpg" title="Caption image 3"></a>
@nicolas-t
nicolas-t / gist:4246006
Last active October 13, 2015 19:38
Chocolat
$(function() {
$('#demoA a').Chocolat({
displayAsALink : true,
linksContainer : 'linksContainer',
overlayColor : '#000',
leftImg : 'images/leftw.gif',
rightImg : 'images/rightw.gif',
closeImg : 'images/closew.gif'
});
$('#demoB a').Chocolat({