Skip to content

Instantly share code, notes, and snippets.

View nikkow's full-sized avatar
💻
It’s kind of fun to do the impossible

Nicolas Nunge nikkow

💻
It’s kind of fun to do the impossible
View GitHub Profile
- .DS_Store
- ._*
- trashbox/*
- .sync-filter
#!/bin/sh
rclone sync /mnt/disk1/documents OVH_Object_Storage:nas-sauvegarde/documents
@nikkow
nikkow / ageCalculation.php
Created March 8, 2015 17:06
Calculer un âge en PHP
<?php
/**
* Méthode permettant de calculer l'âge en PHP
* à partir d'une date au format JJ/MM/AAAA (à la française)
*/
function getAge($dateOfBirth) {
// On split la date de naissance au caractère "/"
$segments = explode('/', $dateOfBirth);
// On calcule le timestamp UNIX correspondant à cette date
@nikkow
nikkow / nwNoScroll.js
Last active August 29, 2015 14:16
Disable "bounce" effect in NW.js
var keysToDisable = [37, 38, 39, 40, 33, 34, 35, 36];
function preventDefault(e) {
e = e || window.event;
if (e.preventDefault) {
e.preventDefault();
}
e.returnValue = false;
}