Skip to content

Instantly share code, notes, and snippets.

View scips's full-sized avatar

Sébastien Barbieri scips

View GitHub Profile
@scips
scips / preg_replace.php
Created August 27, 2013 14:57
preg_replace vs str_replace
<?php
for ($i=0;$i<1000000;$i++) {preg_replace('/\-/','','test-test');}
@scips
scips / cakefile
Last active December 19, 2015 07:18
Cakefile sbuild task for sublime
{exec} = require 'child_process'
task 'sbuild', 'Build project from *.coffee to *.js', ->
cwd = process.cwd()
process.chdir 'public/static/'
exec 'coffee -b -m --output js/ coffee/', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr
process.chdir cwd
@scips
scips / bootstrap.js
Last active December 11, 2015 18:19
RequireJS basic bootstrap
require.config({
baseUrl: 'js/lib',
paths: {
application: '../application'
}
});
requirejs(['../app']);