Skip to content

Instantly share code, notes, and snippets.

@jimmylatreille
jimmylatreille / favicon png
Created August 12, 2015 19:41
favicon png
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" />
@jimmylatreille
jimmylatreille / validation_JS.txt
Last active August 29, 2015 14:22
Validation form inputs JS
####### REQUIRE JQUERY #########
//============== USAGE EXEMPLE ===================
var formRegister = 'form#register';
//validate the requiered fields and validate fields
var formInputs = validate_inputs(formRegister + ' input');
// //Check if all the requiered fields are equal to the validated fields and that there's no error fields
@jimmylatreille
jimmylatreille / flash.txt
Last active August 29, 2015 14:22
Flash message
####### REQUIRE JQUERY #########
//============== USAGE EXEMPLE ===================
flash("Flash message", 'info');
//============== HTML ====================
<div class="response">
<h1></h1>
@jimmylatreille
jimmylatreille / ssh.txt
Created June 11, 2015 14:55
Generate and get RSA SSH KEY
ssh-keygen -t rsa -b 4096 -C "[email protected]"
cat ~/.ssh/id_rsa.pub | pbcopy
@jimmylatreille
jimmylatreille / background-adresse.html
Last active August 29, 2015 14:21
background color adresse bar mobile
<meta name="theme-color" content="#FF2813">
@jimmylatreille
jimmylatreille / composer.text
Created November 26, 2014 18:17
Composer ref
======================== COMPOSER REFERENCE =================
composer install // for building composer.json dependencies
composer dump-autoload // to rebuild the autoload file
@jimmylatreille
jimmylatreille / mercurial.hg
Last active August 29, 2015 14:06
Mercirial
## Mercurial Workflow
hg clone http://bitbucket.org/repo => Clone un depot
hg log => Pour affichier les log ou hg glog pour plus d'info
hg status => Pour afficher le status des changements
hg merge => Pour merger des fichier
@jimmylatreille
jimmylatreille / mediaQuery.css
Last active August 29, 2015 14:06
media Query cheat sheet
/* ================================================ */
/* Responsive - Media queries */
/* ================================================ */
/*http://i-skool.co.uk/mobile-development/web-design-for-mobiles-and-tablets-viewport-sizes/*/
/*At least requires the meta viewport tag with content 'width=device-width'*/
@media only screen and (max-width: 1080px) and (orientation : portrait) {
/* PORTRAIT:
Windows Surface Pro*/
}
@jimmylatreille
jimmylatreille / asynchronously_javascript.js
Created September 1, 2014 03:02
asynchronously javascript script
//asynchronously javascript script function
function getScript(url){
var elem = document.createElement('script'),
script = document.getElementsByTagName('script')[0];
elem.src = url;
elem.type = 'text/javascript';
elem.async = true;
//namespacing event
$( 'li' ).on( 'click.logging', function() {
console.log( 'a list item was clicked' );
});
$( 'li' ).on( 'click.analytics', function() {
doSomethingElse();
});
$( 'li' ).off( 'click.logging' );