Skip to content

Instantly share code, notes, and snippets.

View mykiwi's full-sized avatar
🥝
$ docker buildx bake future

Romain Gautier mykiwi

🥝
$ docker buildx bake future
View GitHub Profile
@mykiwi
mykiwi / hackernews-favicons.js
Last active April 20, 2022 18:27 — forked from frabert/COPYING
Greasemonkey scripts
// ==UserScript==
// @name Favicons for HackerNews
// @version 1
// @grant none
// ==/UserScript==
for(let link of document.querySelectorAll('.titlelink')) {
const domain = new URL(link.href).hostname
const imageUrl = `https://icons.duckduckgo.com/ip3/${domain}.ico`
const image = document.createElement('img')
@mykiwi
mykiwi / test.php
Created June 15, 2021 21:31
melody gist integration test
<?php
<<<CONFIG
packages:
- "twig/twig: 3.3.2"
CONFIG;
echo "----------------------------------\n";
$twig = new Twig\Environment(new Twig\Loader\ArrayLoader(array(
'my_template' => 'Hello {{ name }}',
<?php
<<<CONFIG
packages:
- "twig/twig: ^2"
- "twig/intl-extra: 3.x-dev"
- "symfony/var-dumper: ^4"
CONFIG;
$loader = new \Twig\Loader\ArrayLoader([
'ok_fr' => "{{ 'fr'|language_name }}\n",
@mykiwi
mykiwi / flo.sh
Last active May 30, 2017 20:12
Gnome & Hidp - Multiple displays
#!/bin/sh
# https://wiki.archlinux.org/index.php/HiDPI#Multiple_displays
# https://gist.github.com/wvengen/178642bbc8236c1bdb67
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
ext_h=`xrandr | sed 's/^'"${EXT}"' [^0-9]* [0-9]\+x\([0-9]\+\).*$/\1/p;d'`
int_w=`xrandr | sed 's/^'"${INT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@mykiwi
mykiwi / check.php
Last active November 8, 2017 14:07
symfony/requirements-checker with melody
<?php
<<<CONFIG
packages:
- "symfony/requirements-checker: ^1.0"
CONFIG;
$src = dirname((new ReflectionClass('\Symfony\Requirements\Requirement'))->getFileName());
require $src.'/../bin/requirements-checker.php';

Keybase proof

I hereby claim:

  • I am mykiwi on github.
  • I am mykiwi (https://keybase.io/mykiwi) on keybase.
  • I have a public key ASCdE87pPPecuI6FLaKFb69bHxavPiKGj7xs9-TFxK5xLgo

To claim this, I am signing this object:

@mykiwi
mykiwi / docker-compose.yml
Created January 22, 2017 12:04
Rancher + Let's Encrypt
# frontend
# domains, load balancer, https (with let's encrypt) and redirect to https
https-redirect:
image: geldim/https-redirect
letsencrypt-nginx:
tty: true
image: nginx:alpine
stdin_open: true
@mykiwi
mykiwi / docker-compose.yml
Created September 15, 2016 09:44
Drone.io 0.5
drone:
image: drone/drone:0.5
restart: always
net: ci
container_name: drone
environment:
DRONE_GITHUB: "true"
DRONE_GITHUB_CLIENT: "XXX"
DRONE_GITHUB_SECRET: "XXX"
@mykiwi
mykiwi / docker-compose.yml
Last active September 15, 2016 09:42
Drone.io 0.5
drone:
image: drone/drone
restart: always
container_name: drone
environment:
REMOTE_DRIVER: github
REMOTE_CONFIG: https://github.com?client_id=XYZ&client_secret=XYZ
volumes:
- /var/lib/drone:/var/lib/drone
- /var/run/docker.sock:/var/run/docker.sock
@mykiwi
mykiwi / README.md
Last active April 20, 2018 08:17
Mac fresh install
# Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === '92102166af5abdb03f49ce52a40591073a7b859a86e8ff13338cf7db58a19f7844fbc0bb79b2773bf30791e935dbd938') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
chmod +x composer.phar && \