Skip to content

Instantly share code, notes, and snippets.

View Tom32i's full-sized avatar

Thomas Jarrand Tom32i

View GitHub Profile
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@jonathantneal
jonathantneal / README.md
Created September 19, 2012 06:34
Polyfill the EventListener interface in IE8

EventListener Polyfill

Is IE8 your new IE6? Level the playing field with polyfills.

This script polyfills addEventListener, removeEventListener, and dispatchEvent. It is less than half a kilobyte minified and gzipped.

addEventListener

addEventListener registers a single event listener on a single target.

@Tom32i
Tom32i / Key Bindings - User.json
Last active January 4, 2019 09:40
Sublime Text 3 Base configuration
[
{ "keys": ["super+)"], "command": "indent" },
{ "keys": ["super+("], "command": "unindent" }
]
@devster
devster / php_setget.sublime-snippet
Last active August 29, 2015 13:55
PHP setter/getter snippet for sublime text
<snippet>
<content><![CDATA[
/**
* Set ${1:property}
*
* @param ${2:type} \$$1
*
* @return ${3:Type}
*/
public function set${1/^([a-z])/\u$1/g}(\$$1)
@Tom32i
Tom32i / EventEmitter.js
Created June 3, 2014 10:58
Simple EventEmitter Object
/**
* Event Emitter
*/
function EventEmitter ()
{
this.element = document.createElement('div');
}
/**
* Emit a new event
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@maximecolin
maximecolin / MyController.php
Created February 16, 2015 11:26
Symfony2 : add translated flash with parameters, domain or locale
<?php
namespace Acme\DemoBundle;
use Symfony\Bundle\FrameworkBundle\Controller\Controller
class MyController extends Controller
{
/**
* @Template()
@maximecolin
maximecolin / ConsoleListener.php
Last active August 15, 2023 21:17
Symfony2 : Configuring the Request Context for CLI Command
<?php
namespace Acme\DemoBundle\EventListener;
use Symfony\Component\Routing\RouterInterface;
class ConsoleListener
{
/**
* @var RouterInterface
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@Tom32i
Tom32i / README.md
Last active October 13, 2015 09:57
A node.js + browser compatible benchmark suite

Benchmark in node.js & browser

Install

npm install 

Usage:

Node:

node benchmark.js