Skip to content

Instantly share code, notes, and snippets.

🚲
Pedaling

Jérôme Tamarelle GromNaN

Block or report user

Report or block GromNaN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GromNaN
GromNaN / base.twig
Last active Aug 29, 2015
Twig issue #1378
View base.twig
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
{% block head %}
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
{% endblock %}
</head>
<body>
{% block header %}{% endblock %}
View apcclearcache.php
<?php
/**
* Clear APC opcode and user caches on deploy
* per directory and prefix.
*
* Store this file in your default APACHE/NGINX root (/home/www/apcclearcache.php)
* Call this file on deployment:
*
* php /home/www/apcclearcache.php <release_dir> <user_cache_prefix>
View main.js
$(document).ajaxComplete(function(event, XMLHttpRequest){
var link = XMLHttpRequest.getResponseHeader('x-debug-token-link');
if(link) {
$.get(link, function(data){
$('.sf-toolbarreset').remove();
$('body').append(data);
});
}
View 5_11_2013 École du tech lead: Conversation autour de la dette technique
École du tech lead: Conversation autour de la dette technique
----
TLDR de Cyrille Deruel @CyrilleDeruel
Les 3 phrases sur la dettes
- Pas dépuration de la dette sans refactoring et pas de refactoring sans tests automatisés
- Normalement tu n'as pas besoin d'aller chercher la dette, c'est la dette qui te trouve
- Ta dette tu la gères tous les jours
View post-checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\e[0m'
@GromNaN
GromNaN / Symfony1GuardPasswordEncoder.php
Created Apr 5, 2013
Implements symfony1 password encoding for Symfony2 security component
View Symfony1GuardPasswordEncoder.php
<?php
namespace Security\Encoder;
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
/**
* Implements symfony1 password encoding
*
* @see PluginsfGuardUser::checkPasswordByGuard()
@GromNaN
GromNaN / errors.php
Created Nov 21, 2012
Jolies erreurs PHP
View errors.php
<?php
function handler ($errno, $errstr, $errfile, $errline)
{
echo "<div style=\"background: #ffe13b; color: black; position: fixed; bottom: 0; width: 100%; text-align: center; font-size: 13px; padding: 5px; box-shadow: 0 0 5px black;\">Erreur $errno $errstr in $errfile:$errline
</div>";
}
set_error_handler('handler');
@GromNaN
GromNaN / MirrorCommand.php
Created Oct 3, 2012
Satis Mirror repositories
View MirrorCommand.php
<?php
/*
* This file is part of Satis.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
* Nils Adermann <naderman@naderman.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@GromNaN
GromNaN / mirror-git.sh
Created Aug 30, 2012
Mirror Git repositories
View mirror-git.sh
# This commands to keep in sync a clone of a Git repository
ORIGIN=https://github.com/symfony/symfony.git
MIRROR=git@gitlab.xxx.com
BARE=~/mirror/symfony.git
# First clone
git clone --bare ${ORIGIN} ${BARE}
cd ${BARE}
@GromNaN
GromNaN / latency.txt
Created Jul 5, 2012 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
You can’t perform that action at this time.