Skip to content

Instantly share code, notes, and snippets.

View thierrymarianne's full-sized avatar

Th. Ma. thierrymarianne

  • Greater Paris Metropolitan Area
View GitHub Profile
@ohanhi
ohanhi / frp.md
Last active December 23, 2022 13:06
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@Tuxosaurus
Tuxosaurus / pimp_trello
Last active August 29, 2015 14:14
Pimp Trello for better usability with CSS injection
/* I use the Stylish extension for this, in addition to Scrum for Trello extensions, with Google Chrome browser */
/* explicit labels */
body .list-card-labels {
float: right;
top: -2px;
right: -2px;
max-width: 200px;
margin: 0;
@GromNaN
GromNaN / .htaccess
Created January 6, 2015 16:42
Bridge Wordpress & Symfony
<IfModule mod_rewrite.c>
RewriteEngine On
# Symfony2 URLs begins with app or admin/dashboard
RewriteRule ^app/ app.php [QSA,L]
RewriteRule ^admin/dashboard app.php [QSA,L]
# Others requests are redirected to Wordpress
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
@olizilla
olizilla / README.md
Last active January 10, 2016 19:52
Notes from SquatConf 2014. Typed quickly, all concepts may be corrupted, but the gist is there.

Notes From SquatConf 2014

@dhigit9 - UDT: an application leyer TCP you can tune.

Replace TCP, application layer comm framework.

instantwebp2p - node fork that supports UDT. congestion control - optimal usage of bandwidth flow control - avoid overwhelming the receiver. window based - no packets in flight

@antfroger
antfroger / forum_php_2014.md
Last active October 21, 2017 12:53
Forum PHP 2014
@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy
@lologhi
lologhi / 1.How to easily implement a REST API with oAuth2 presentation.md
Last active April 4, 2024 22:13
Symfony2 : How to easily implement a REST API with oAuth2 (for normal guys)

It's still a work in progress...

Intro

As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.

Ok, you know the bundles

You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :

@jnovack
jnovack / README.md
Last active April 3, 2024 03:24
Opening up mosh in firewalld using firewall-cmd

Mosh (mobile shell) is a gift from the Gods(tm). Anyone with spotty internet or wireless connection has suffered the pain of a lost SSH session. Sure, one can fire up screen (or tmux as the kids are using these days), but that's an extra step and you are still using the SSH protocol.

I'm not here to tout the benefits of Mosh, you came here to open it up in your firewall.

  1. Create the following file as /etc/firewalld/services/mosh.xml
  2. firewall-cmd --add-service=mosh --permanent
  3. firewall-cmd --reload

If you tend to have a lot of sessions (not recommended), you can increase the ports, but the default should be fine for most applications.

<?php
namespace igorw\lusp;
// all functions return a pair of [val, env]
function evaluate($expr, $env = []) {
if (is_string($expr)) {
if (is_numeric($expr)) {
$val = (float) $expr;
@lyrixx
lyrixx / segfault-finder.php
Last active August 15, 2023 21:17
How to find a segfault in PHP
<?php
register_tick_function(function() {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
$last = reset($bt);
$info = sprintf("%s +%d\n", $last['file'], $last['line']);
file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND);
// or
// file_put_contents('php://output', $info, FILE_APPEND);
});