Skip to content

Instantly share code, notes, and snippets.

@guizmo
guizmo / upload_file.sh
Created August 16, 2012 20:56
Upload file via ssh
scp someFile someUser@someServer:/somePath/someFile
@guizmo
guizmo / delete.sh
Created September 17, 2012 09:35
delete
# Remove all files and directories (recursive removal)
rm -rf path/to/folder
# Remove / Delete directory called /tmp/foo
rmdir /tmp/foo
@guizmo
guizmo / resize.js
Created November 22, 2012 22:00
Text resizer
//http://wp.tutsplus.com/tutorials/theme-development/creating-a-wordpress-post-text-size-changer-using-jquery/
// This prevents the execution of the code before the document is finished loading.
jQuery(document).ready(function() {
    // The 'A+' element  in the page is associated with the jQuery click() event.
    jQuery('#increase-font').click(function(event) {
        // This prevents the default action of the click() event from being triggered.
        event.preventDefault();
        // The jQuery each() event interates over each elements belonging to the 'resize' class
        jQuery('.resize').each(function() {
            // Call to a custom function to increase the text size
@guizmo
guizmo / nc_list.php
Created January 17, 2013 02:40
List commune New Caledonia
function nc_opt_list_communes() {
$options = array(
'98812' => 'Boulouparis',
'98870' => 'Bourail',
'98813' => 'Canala',
'98830' => 'Dumbéa',
'98881' => 'Farino',
'98815' => 'Hienghène',
'98816' => 'Houaïlou',
'98811' => 'îles Belep',