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:1784f2cbc0b81f21ff20a7c3062f7265
Last active November 3, 2022 22:36 — forked from garbados/gist:f82604ea639e0e47bf44
Falsehoods Programmers Believe About Gender
  1. There are two and only two genders.
  2. Okay, then there are two and only two biological genders.
  3. Gender is determined solely by biology.
  4. Okay, it’s mostly determined by biology, right?
  5. Please tell me it’s determined by DNA.
  6. Gender can be reliably determined through visual means. After all, no man would ever wear a burka.
  7. Once gender is set, it never changes.
  8. Even if the gender can change, it will only change from the one value to the other value.
  9. Only one gender can be “active” at the same time.
  10. We’re tracking gender now, so we’ve always tracked it.
window.onload = function start() {
'use strict';
};
var jose = function jose() {
dataset1.forEach(function myFunction(infos) {
console.log(infos);
beauvais();
});
};
@elgamine-dev
elgamine-dev / 0_reuse_code.js
Created January 5, 2017 11:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@elgamine-dev
elgamine-dev / EventSystem.js
Last active June 24, 2016 21:51 — forked from minwe/EventSystem.js
Global event system for React.js
let EventSystem = (function() {
this.queue = {};
return {
publish: (event, data) => {
let queue = this.queue[event];
if (typeof queue === 'undefined') {
return false;
}
@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

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

var gulp = require('gulp');
var gutil = require('gulp-util');
var uglify = require('gulp-uglify');
var jshint = require('gulp-jshint');
var insert = require('gulp-insert');
var livereload = require('gulp-livereload');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var watchify = require('watchify');
var browserify = require('browserify');

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
#!/bin/bash
# Install script for LEMP Web Server on CENTOS 6.5 by Majid Arif Siddiqui
# Init
echo "Initializing..."
sudo yum -y update
sudo yum -y groupinstall "Development Tools"
sudo yum -y install screen

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: