Skip to content

Instantly share code, notes, and snippets.

@mistergraphx
mistergraphx / convert_iso_2_utf8
Created July 21, 2016 14:12
CONVERTION ISO1 vers UTF8
cat <<EOF
------------------------------------------
CONVERTION ISO1 vers UTF8
------------------------------------------
Utilisé pour convertir un spip < 1.9.x
Vers Spip 2.1.X en utf8
- convertion d'une liste de fichiers
perl -MENCODE traitement des caractères spéciaux
- sed sur latin1 -> utf8 dans la déclaration des tables
@mistergraphx
mistergraphx / Create iOS Icons.jsx
Last active July 28, 2016 06:10 — forked from RichardBronosky/Create iOS Icons.jsx
Photoshop Script to Create iPhone Icons from iTunesArtwork Original: https://gist.github.com/appsbynight/3681050
// Photoshop Script to Create iPhone Icons from iTunesArtwork
// Original: https://gist.github.com/appsbynight/3681050
// Turn debugger on. 0 is off.
// $.level = 1;
try
{
// Prompt user to select iTunesArtwork file. Clicking "Cancel" returns null.
var iTunesArtwork = File.openDialog("Select a sqaure PNG file that is at least 1024x1024.", "*.png", false);
@mistergraphx
mistergraphx / _decimal.scss
Created July 15, 2016 14:57 — forked from terkel/_decimal.scss
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
@mistergraphx
mistergraphx / SassMeister-input-HTML.html
Last active April 3, 2016 07:53
unicode_icons Generated by SassMeister.com.
<h2>Icon</h2>
<spân class="icon-add" aria-hidden="true"></span>
<h2>Buttons</h2>
<a class="button" href="#">Simple button</a>
<a class="button icon-add" href="#">Add</a>
<a class="button icon-edit" href="#">Edit</a>
<a class="button icon-delete" href="#">Delete</a>
<a class="button icon-save" href="#">Save</a>
function browserSyncInit(baseDir, files) {
browserSync.instance = browserSync.init(files, {
startPath: '/', server: { baseDir: baseDir }
});
}
// starts a development server
// runs preprocessor tasks before,
// and serves the src and .tmp folders
gulp.task(
@mistergraphx
mistergraphx / filtre_joli_prix.php
Created March 4, 2016 12:51
Un filtre pour formatter des prix
/**
* filtre joli_prix
*
* formatter un prix de manière plus esthétique
*
* @param $decimals (avant|apres !default) place la decimal avant ou après la devise
*
*/
function filtre_joli_prix($prix, $decimals='apres'){
@mistergraphx
mistergraphx / Super simple background image slideshow.css
Created February 29, 2016 16:51 — forked from mhulse/Super simple background image slideshow.css
Super simple jQuery background-image random slideshow (using CSS3 for the transition and gets the image paths via HTML5 `data` attribute).
[data-slides] {
background-image: url(../../uploads/banner1.jpg); /* Default image. */
background-repeat: no-repeat;
background-position: center top;
background-size: cover;
transition: background-image 1s linear;
}
/* Use additional CSS to control the `height` of `[data-slides]`, like so: */
@mistergraphx
mistergraphx / mapisset-input.scss
Last active April 3, 2016 07:56
map-isset() testing tool for maps - Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
/* @function map-isset()
Sometimes we need to test if a map is really set.
Testing with variable_exist is not enought, cause if map is empty it return true
Type-of return false if the map is empty
@mistergraphx
mistergraphx / SassMeister-input.scss
Created February 19, 2016 08:57
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@import "bourbon/bourbon";
$icon-family-name: 'icons' !default;
$icon-prefix: 'icon' !default;
$icon-set-map: (
@mistergraphx
mistergraphx / SassMeister-input-HTML.markdown
Last active February 17, 2016 13:44
Generated by SassMeister.com.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in erat ut urna cursus vestibulum. Phasellus tempus. Aenean ut eros et nisl sagittis vestibulum. Cras risus ipsum, faucibus ut, ullamcorper id, varius ac, leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus. Pellentesque dapibus hendrerit tortor. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Vivamus consectetuer hendrerit lacus. Curabitur at lacus ac velit ornare lobortis. In hac habitasse platea dictumst.

Titre de niveau 1

Titre de niveau 2

Titre de niveau 3

Titre de niveau 4

Titre de niveau 5