Skip to content

Instantly share code, notes, and snippets.

View maximecolin's full-sized avatar

Maxime COLIN maximecolin

View GitHub Profile
@nervo
nervo / README.md
Last active January 7, 2020 12:31
Hyphen Gate

How to

In both cases, it you use manalize tool, update it !!!

manalize selfupdate

Quick & dirty

Not future proof, but you won't loose you current virtual machine and related data (databases and so)

@Benoitlecorre
Benoitlecorre / algo_apb_proper.sql
Last active June 16, 2020 12:09
Code source d'Admission post-bac envoyé par le ministère de l'Education nationale
-- Génération automatique de classements aléatoires en production, pour les FNS
-- ===================================
FUNCTION gen_class_aiea_v1_relatif_grp( o_g_ea_cod_ins IN varchar2, o_g_ti_cod IN number, o_c_gp_cod IN number, o_g_tg_cod IN number, iogin IN varchar2, type_login IN number, mode_dev IN number, confirm IN number, saio IN number, nip IN varchar2, indic IN number, mess_err out varchar2, mess_aff out varchar2)
RETURN number IS
retour number;
X varchar2(2);
dummy number;
dummy2 number;
l_c_gp_fIg_seI c_grp.c_gp_flg_sel%type;
@Tom32i
Tom32i / SERVE.md
Last active January 29, 2016 10:03
Quickly serve a local directory with PHP built-in server.

Quickly serve a local directory

php -S localhost:8000

You directory is accessible on: http://localhost:8000

Create an alias for it

In ~/.bashrc add:

@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

@Tom32i
Tom32i / gzip.conf
Created September 9, 2015 08:26
GZIP config for Nginx
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_min_length 256;
gzip_comp_level 6;
@skowron-line
skowron-line / monolog.json
Last active December 30, 2023 18:58
lnav Monolog format
{
"monolog": {
"title": "Monolog log file",
"description": "Monolog log format",
"url": "https://github.com/Seldaek/monolog",
"regex": {
"default": {
"pattern": "\\[(?P<timestamp>.*)\\] (?P<logger>\\w+).(?P<level>\\w+): (?P<message>[^\\[\\{]+) (?P<context>[\\[\\{].*[\\]\\}]) (?P<extra>[\\[\\{].*[\\]\\}])"
}
},
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
# If you open your Ressource monitoring under OSX, you'll see that the
# Process "Spotify Helper" is eating between 20% and 30% of CPU constantly
# It means that when you're on battery, it'll drain it faster.
# To prevent the Spotify Helper (which are basically ads for spotify) from spawning process,
# you should disable access to the app doing this (close Spotify first) :
sudo chmod 000 "/Applications/Spotify.app/Contents/Frameworks/Spotify Helper EH.app"
sudo chmod -N "/Applications/Spotify.app/Contents/Frameworks/Spotify Helper EH.app"
@Tom32i
Tom32i / elao.txt
Created July 8, 2014 14:26
-~=[ elao ASCII ]=~-
+-----------------------------------------------------------------------------+
| |
| A0. 0000 |
| AAV 0000 |
| AAV 0000 |
| _.n0000n._°0Q 0000 _.aaAaa._ _.aaAaa._ |
| .o0AAAAAAAAA0o. 0000 .00000"""00000. .00000"""00000. |
| 0AAP° °QAA0 0000 000° °000 000° °000 |
| 0AV VAA 0000 000 000 000 000 |
@igorw
igorw / php-lazy-seq.php
Last active August 23, 2021 16:47
Lazy sequences using PHP 5.5 generators.
<?php
// thanks to metaultralurker on reddit for inspiration
function map(callable $fn, \Traversable $data) {
foreach ($data as $v) {
yield $fn($v);
}
}