Skip to content

Instantly share code, notes, and snippets.

View gostrafx's full-sized avatar

GOSTRA FX gostrafx

View GitHub Profile
@gostrafx
gostrafx / Vim cheat sheet.md
Last active May 19, 2019 22:17
Vim cheat sheet

A highly opinionated vim cheat sheet.

Copy / Cut / Paste (normal mode)

  • selecting:
    • v: start selecting characters
    • V: selects the whole line
  • action:
    • d: to cut
  • y: to copy
@gostrafx
gostrafx / Table PHP.md
Last active May 19, 2019 22:18
Table PHP
<?php

<!-- Mon tableau -->

$retour = "<br />";
$prenom="John";//string
echo $prenom;
echo gettype($prenom);
echo $retour;
@gostrafx
gostrafx / Header php.md
Last active May 19, 2019 22:18
Header php
<?php

// Utilisez cette tête instruction pour corriger 404 têtes
// Produit par url rewriting ...
header('HTTP/1.1 200 OK');

// Page n'a pas été trouvé:
header('HTTP/1.1 404 Not Found');
@gostrafx
gostrafx / gulpfile.js
Last active May 19, 2019 22:18
gulpfile
"use strict";
const {src, dest, watch, series, parallel, lastRun} = require('gulp');
const del = require('del');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const concat = require('gulp-concat');
const browserSync = require('browser-sync');
const uglify = require('gulp-uglify');
const postcss = require('gulp-postcss');
@gostrafx
gostrafx / Socket php.md
Last active May 19, 2019 22:19
Socket php

Crée un point de communication et le retourne sous forme de ressource

socket_create	    

Permet de se connecter à une socket existante

socket_connect	
@gostrafx
gostrafx / Javascript Fetch.md
Created May 19, 2019 22:20
Javascript Fetch

Fetch

fetch('/data.json')
  .then(response => response.json())
  .then(data => {
    console.log(data)
  })
  .catch(err => ...)
  • gulp-ruby-sass
  • gulp-autoprefixer
  • gulp-minify-css
  • gulp-jshint
  • gulp-concat
  • gulp-uglify
  • gulp-imagemin
  • gulp-livereload (requires tiny-lr)
  • gulp-clean
  • gulp-cache
@gostrafx
gostrafx / Javascript Promises.md
Created May 19, 2019 22:21
Javascript Promises

Based on the [Promise API reference][promise] (mozilla.org).

promise

Creating promises

new Promise(function (ok, err) {
 doStuff(function () {
@gostrafx
gostrafx / ECMAScript 6.md
Created May 19, 2019 22:22
ECMAScript 6

Introduction

ECMAScript 6, also known as ECMAScript 2015, is the latest version of the ECMAScript standard. ES6 is a significant update to the language, and the first update to the language since ES5 was standardized in 2009. Implementation of these features in major JavaScript engines is underway now.

See the ES6 standard for full specification of the ECMAScript 6 language.

ES6 includes the following new features:

@gostrafx
gostrafx / seo_head_Tags.md
Created May 19, 2019 22:28
Seo Head Tags