# 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 && \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<<<CONFIG | |
packages: | |
- "twig/twig: 3.3.2" | |
CONFIG; | |
echo "----------------------------------\n"; | |
$twig = new Twig\Environment(new Twig\Loader\ArrayLoader(array( | |
'my_template' => 'Hello {{ name }}', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<<<CONFIG | |
packages: | |
- "symfony/requirements-checker: ^1.0" | |
CONFIG; | |
$src = dirname((new ReflectionClass('\Symfony\Requirements\Requirement'))->getFileName()); | |
require $src.'/../bin/requirements-checker.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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'` |
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder