Skip to content

Instantly share code, notes, and snippets.

View elgamine-dev's full-sized avatar

Amine EL G elgamine-dev

  • Toulouse, France
View GitHub Profile
@elgamine-dev
elgamine-dev / gist:8bde817c8e09cece31e99d58ea02a6d5
Created June 12, 2016 16:44 — forked from robotslave/gist:4633393
How to get Emoji in your Ubuntu Terminal
<!--
1. Download the Android Jelly Bean fonts and the Symbola font:
https://www.dropbox.com/s/tvtzcnzkvbe0nrt/jelly-bean-fonts.zip
http://users.teilar.gr/~g1951d/Symbola707.zip
2. unzip the files and put AndroidEmoji.ttf and Symbola.ttf (and any of the other fonts that strike your fancy)
in your ~/.fonts/ directory
3. run `fc-cache -f`. You can check to make sure the new fonts
were installed with `fc-list`. You'll probably want to grep the copious output for Symbola or Emoji
_________________________________________
/ The Least Perceptive Literary Critic \
| |
| The most important critic in our field |
| of study is Lord Halifax. A most |
| individual judge of poetry, he once |
| invited Alexander Pope round to give a |
| public reading of his latest poem. |
| |
| Pope, the leading poet of his day, was |
<?php
session_start();
if(isset($_POST['msg'])) {
$_SESSION['msg'] = htmlspecialchars($_POST['msg']);
}
if(isset($_GET['logout'])) {

Les test unitaites

en résumé du code qui permet de tester du code. On écrit du code qui va executer la fonction en lui passant des parametres et en comparant le résultat avec celui attendu par lé développeur ex: si on a une fonction qui fait une somme ainsi

function somme(a, b){
  return a + b;
}

on pourrait la tester en faisant

@elgamine-dev
elgamine-dev / gulpfile.js
Last active May 7, 2022 14:29
Gulp with sass
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');
// Static Server + watching scss/html files
gulp.task('serve', ['sass'], function() {
browserSync.init({
server: "./"
});
var me = {
name:"Amine",
last_name:"El Ghayate",
getFullName: function(){
},
getOccupation: function(){
},
setName : function(){
vous allez remplacer votre nom par <span elt="first_name"></span>
par exemple :
<h1>Amine El G</h1>
deviens
<h1><span elt="first_name"></span> <span elt="last_namr"></span></h1>
pareille avec votre titre
Algo dans votre app.js :
- charger le fichier user-{id}.json en ajax avec la methode getJSON
@elgamine-dev
elgamine-dev / index.js
Created November 11, 2015 15:45
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var moment = require('moment');
console.log(moment().format());