Skip to content

Instantly share code, notes, and snippets.

View andrearufo's full-sized avatar
🖖
Live long and prosper

Andrea Rufo andrearufo

🖖
Live long and prosper
View GitHub Profile
@andrearufo
andrearufo / gaussiandice
Created September 18, 2014 22:10
Super simple Gaussian distribution with two dice
<pre>
<?php
$n = 10000;
$min = 1;
$max = 20;
$values = array();

A simple html+css popup at page open

When you open the page, a series of divs appears over your content with important messages or images. You can close it with a simple click !

A Pen by Andrea Rufo on CodePen.

License.

@andrearufo
andrearufo / titleIndex.js
Created March 16, 2014 08:06
How to create an index of titles in a HTML page with jQuery
$(window).ready( function(){
var titid = 0;
$('.documentation h3').each(function(){
titid = titid+1;
$(this).attr('id', 'tit'+titid);
$('#indice').append('<li><a href="#tit' + titid + '">' + $(this).text() + '</a></li>');
})