This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pour les retours à la ligne mettre \n | |
// %c applique du css. A chaque %c, ca applique le css suivant, | |
// donc de 'Made by Creaktif' a '\n' ca applique 'background: #cdcdcd; color: #fff' | |
// et après celui ci 'background: #8a8a8a; color: #fff', car il y a de nouveau un %c après le \n | |
console.log('%c MADE BY CREAKTIF \n%c www.creaktif.com ', 'background: #cdcdcd; color: #fff', 'background: #8a8a8a; color: #fff'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://dev.twitter.com/cards/types */ | |
<meta name="twitter:card" content="photo" /> | |
<meta name="twitter:title" content="Découvrez le nouveau calendrier de l'avent #Milka" /> | |
<meta name="twitter:description" content="Comptez les nuit jusqu'à Noël grâce au nouveau calendrier de l'avent #Milka et découvrez des surprises sur avent.milka.fr" /> | |
<meta name="twitter:image" content="https://avent.milka.fr/img/tcard.jpg" /> | |
<meta name="twitter:url" content="https://avent.milka.fr" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m SimpleHTTPServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//From http://stackoverflow.com/questions/12606245/detect-if-browser-is-running-on-an-android-or-ios-device | |
var isMobile = { | |
Android: function() { | |
return /Android/i.test(navigator.userAgent); | |
}, | |
BlackBerry: function() { | |
return /BlackBerry/i.test(navigator.userAgent); | |
}, | |
iOS: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://stackoverflow.com/questions/9914816/what-is-an-example-of-the-simplest-possible-socket-io-example | |
var http = require('http'), | |
fs = require('fs'), | |
// NEVER use a Sync function except at start-up! | |
index = fs.readFileSync(__dirname + '/index.html'); | |
// Send index.html to all requests | |
var app = http.createServer(function(req, res) { | |
res.writeHead(200, {'Content-Type': 'text/html'}); | |
res.end(index); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
//That function list all the files in the directory. | |
//Loop all the file in the folder | |
//If the current object is a folder -> ignore it | |
//Else if the file name index of 'mairie' (the original image sequence file was named "mairie"+n, where n started at 200) | |
//rename it in "mairie"+i, to get an image sequence that begin at 0 and not 200 | |
function getFiles (dir, files_){ | |
files_ = files_ || []; | |
var files = fs.readdirSync(dir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open -n /Applications/Slack.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Afar => aa | |
Abkhazian => ab | |
Avestan => ae | |
Afrikaans => af | |
Akan => ak | |
Amharic => am | |
Arabic => ar | |
Assamese => as | |
Avar => av | |
Aymara => ay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var v = (value-min)/(max-min) ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Show hidden files | |
defaults write com.apple.finder AppleShowAllFiles YES | |
// Reload Finder instances | |
killall Finder | |
// Show path in finder | |
Option + Command + P | |
// Show tab bar |