Skip to content

Instantly share code, notes, and snippets.

View pimeo's full-sized avatar

Brtrnd Sru pimeo

View GitHub Profile
@pimeo
pimeo / DIC.js
Last active April 8, 2020 11:18 — forked from jsmanifest/DIC.js
//
// Reference: https://medium.com/better-programming/dependency-injection-containers-in-javascript-5fd2c2b4be30
//
import parseFunction from 'parse-function'
const app = parseFunction({
ecmaVersion: 2017,
})
<?php
namespace App\Migrations;
use Phinx\Seed\AbstractSeed;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Filesystem\Exception\FileNotFoundException;
class AbstractSeedFromJson extends AbstractSeed
{
@pimeo
pimeo / app.js
Last active January 4, 2018 00:31
todo app
// CRITIQUE toujours dependre de l'evenement de DOMContentLoaded
// avant de lancer une instruction qui comporte une modification ou un ajout d'elements dans le DOM
document.querySelector('.new-todo').addEventListener('keypress', function (e) {
var key = e.keyCode;
if (key === 13) { // 13 is enter
// INTERDIT ! il faut utiliser le système de template fourni
//var txtToDo = document.querySelector('.new-todo').value;
//var li = document.createElement('li');
//var div = document.createElement('div');
@pimeo
pimeo / tracking_ubi.js
Created January 11, 2017 10:28
Tracking UBI Class
'use strict'
import Store from 'stores/store'
const TRACKING = {
DEBUG: true,//"<%= global.environment %>".match(/development/gi),
PAGES: {
// heroes xp
@pimeo
pimeo / CLGeocoder+Timeout.swift
Created June 17, 2016 16:43
CLGeocoder reverseGeocodeLocation with timeout swift 2.0
//
// CLGeocoder+Timeout.swift
//
// Created by Bertrand Souriau on 17/06/2016.
// Thanks to Mathias Amnell (https://github.com/apping/APFoundation/blob/master/Pod/Classes/CLGeocoder%2BTimeout.m)
import Foundation
import MobileCoreServices
import CoreLocation
@pimeo
pimeo / README.md
Last active May 30, 2017 21:55
command to add dynamic alias

README

    1. Create ez-alias.sh file
    1. Add directory of the ez-alias script file to export PATH (ex: export PATH=:/$HOME/BASH)
    1. Add the command source $HOME/BASH/aliases.sh to $HOME/.bash_profile file and source it
    1. Go to any directory and launch command ez-alias.sh and type in the name of your alias then reboot the terminal
  • Done !