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 / 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 / _.md
Last active August 29, 2015 14:17 — forked from klange/_.md

Since this is on Hacker News...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later).
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • They're all while loops because shut up, you're overthinking a joke.
@mykiwi
mykiwi / app.php
Last active December 17, 2015 06:58
Dispatcher between Symfony2 and a legacy application
<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
// Hack SwiftMailer (symfony1 vs Symfony2)
define('SWIFT_REQUIRED_LOADED', true);
@mykiwi
mykiwi / client-slow.php
Last active December 16, 2015 21:19 — forked from igorw/client-slow.php
<?php
require __DIR__.'/vendor/autoload.php';
use React\Curry\Util as Curry;
$projects = array(
'react-php/react',
'cboden/Ratchet',
'nrk/predis-async',