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
# Capistrano Laravel 4 Deployment Tasks
# Watts Martin (layotl at gmail com)
# https://gist.github.com/chipotle/5506641
# updated 14-Aug-2013
# Assumptions:
#
# - You are using a .gitignore similar to Laravel's default, so your
# vendor directory and composer(.phar) are *not* under version control
# - Composer is installed as an executable at /usr/local/bin/composer

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/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

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] {
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');

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 / 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
@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 / 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
window.onload = function start() {
'use strict';
};
var jose = function jose() {
dataset1.forEach(function myFunction(infos) {
console.log(infos);
beauvais();
});
};