Skip to content

Instantly share code, notes, and snippets.


Alain Tiemblo ninsuo

Block or report user

Report or block ninsuo

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
ninsuo / code.php
Created Jun 24, 2019
View code.php
class Cornicode
static public function cornichonize(string $text) {
// Reverse
$cypher = strrev($text);
// Rotate
ninsuo / templatize.php
Created May 10, 2019
Takes each line in stdin, and wrap it with a template
View templatize.php
if (!isset($argv[1])) {
die(sprintf('You forgot to give a template: %s "<prefix> %%s <suffix>"%s', $argv[0], "\n"));
$template = $argv[1];
$raw = file_get_contents('php://stdin');
$lines = explode(PHP_EOL, $raw);
ninsuo / degrade.php
Created Mar 6, 2019
degrade.php - the most ugly code i ever made in life
View degrade.php
// ------------------------------------------
// ------------------------------------------
// ---------------------------------------------
// Allowed GET arguments:
// a -> applies transparency to background color
// c -> colors (use '-' for color separator)
View Monospace.php
* Cette classe permet d'écrire un document de type plain/text
* formatté en monospace.
* Cette classe supporte :
* - les lignes
* - l'alignement
* - les sauts de ligne
ninsuo /
Last active Jun 15, 2017
auto renewing cerificates generated from lets-encrypt
#!/dgr/bin/busybox sh
# copied from
set -e
. /dgr/bin/
isLevelEnabled "debug" && set -x
## Create certif
# certbot certonly --email --webroot -w /var/lib/letsencrypt/ -d domain.tld,sub.domain.tld
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

ninsuo / xliff-to-yaml.php
Last active Jan 18, 2019
Takes a Symfony xlf file and converts it to YAML
View xliff-to-yaml.php
$content = file_get_contents('messages.en.xlf');
Converts crazy xliffs files into readable yaml:
<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
ninsuo / tidypics.php
Last active Feb 23, 2016
Tidy up pictures from a camera (generated path format: Y-m-d/H:i:s.ext)
View tidypics.php
# Run me inside a directory full of pictures
# Create an alias for easier use!
$path = $_SERVER['PWD'];
$glob = glob("/{$path}/*");
You can’t perform that action at this time.