Skip to content

Instantly share code, notes, and snippets.


Benjamin Delespierre bdelespierre

Block or report user

Report or block bdelespierre

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
View postgresql_table_rowcount.sql
nspname AS schemaname,relname,reltuples
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
nspname NOT IN ('pg_catalog', 'information_schema') AND
ORDER BY reltuples DESC;
View instagram_autofollow.js
(function(e,s,n) {
e.src = s;
e.onload = function() {
console.log('jQuery injected');
})(document.createElement('script'), '//', function($){
(function follow() {
// change the inner HTML to your language
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname

Static Auto-completion

Create a file in:


With the following content:

View RefreshSqliteDatabase.php
namespace Tests;
use App\Console\Kernel;
use Illuminate\Foundation\Testing\RefreshDatabaseState;
use Illuminate\Support\Facades\DB;
use RuntimeException;
trait RefreshSqliteDatabase
View exemplar_sqlite.php
include __DIR__ . '/../vendor/autoload.php';
| Create The Application
| The first thing we will do is create a new Laravel application instance
View command.php
// ----------------------------------------------------------------------------
// $argc: nombre d'argument de la commande
// ----------------------------------------------------------------------------
// e.g. pour la commande 'php file.php foo bar baz',
// $argc vaut 3
// car il y a 3 arguments: "foo", "bar", et "baz"
View WorkflowyStylableTags.js
// ==UserScript==
// @name WorkflowyStylableTags
// @description Gives each tag it's own css style, so you can style them with Stylish. I use Blank Canvas to manage my userscripts in Chrome.
// @author Nigel Thorne and LukeMT and bdelespierre
// @include http*://**
// @version 1.2
// ==/UserScript==
var customClasses = function(index, old){
return old.split(" ").filter(str => str.match(/-proj$/)).join(" ");
View array_cartesian_product.php
function array_cartesian_product(...$items): array
if (empty($items)) {
return [];
if (count($items) == 1) {
foreach ((array) $items[0] as $value) {
View job_offer.php
namespace Addworking\JobOffers;
class LaravelDeveloper extends JobOffer
use Concerns\IsAwesome, Concerns\IsStartup, Concerns\IsDisruptive;
protected $fillable = [
'firstname', 'lastname', 'email',
You can’t perform that action at this time.