Skip to content

Instantly share code, notes, and snippets.

View mathroc's full-sized avatar

Mathieu Rochette mathroc

View GitHub Profile
<?php
// Translator
interface Translator
{
/**
* @param array<mixed> $context
*/
public function translate(string $message, array $context = [], ?LocalesPreferences $localesPreferences = null): string;

Keybase proof

I hereby claim:

  • I am mathroc on github.
  • I am mathroc (https://keybase.io/mathroc) on keybase.
  • I have a public key ASCgSWSIXBKRMkz8zUnbeRwpvI8PiLYaUWE7z7ZEI5YTWAo

To claim this, I am signing this object:

Verifying that "mathroc.id" is my Blockstack ID. https://onename.com/mathroc
proxy:
image: jwilder/nginx-proxy
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- 5498:80
backend:
image: php:5.6-apache
environment:
VIRTUAL_HOST: test-jwilder-nginx-proxy.127.0.0.1.xip.io
@mathroc
mathroc / keybase.md
Last active November 24, 2017 01:32

Keybase proof

I hereby claim:

  • I am mathroc on github.
  • I am mathroc (https://keybase.io/mathroc) on keybase.
  • I have a public key whose fingerprint is EDF2 C757 DC80 4B29 6EBA FBDA B404 42D5 6A30 89CF

To claim this, I am signing this object:

@mathroc
mathroc / config.json
Last active August 29, 2015 14:14
yargs #72
{
"arg_no_default____config_false_no_cli___" : false,
"arg_default_true__config_false_no_cli___" : false,
"arg_default_false_config_false_no_cli___" : false,
"arg_no_default____config_true__no_cli___" : true,
"arg_default_true__config_true__no_cli___" : true,
"arg_default_false_config_true__no_cli___" : true,
"arg_no_default____config_true__cli_true_" : true,
"arg_default_true__config_true__cli_true_" : true,
"arg_default_false_config_true__cli_true_" : true,
┐┌┐┌┐
┘└┘└┘\ₒ/
┐┌┐┌┐ ∕ Friday
┘└┘└┘ノ)
┐┌┐┌┐ deploy,
┘└┘└┘
┐┌┐┌┐ good
┘└┘└┘
┐┌┐┌┐ luck!
│││││
@mathroc
mathroc / docker-reverse-proxy.sh
Last active August 29, 2015 14:12
Reverse proxy for docker container
docker run -d --restart=always -v /var/run/docker.sock:/tmp/docker.sock:ro --name reverseproxy -p 80:80 jwilder/nginx-proxy
docker run -d --restart=always -v /var/run/docker.sock:/tmp/docker.sock:ro --name virtual_hosts -e VIRTUAL_HOST=dev.127.0.0.1.xip.io texthtml/docker-vhosts
# set VIRTUAL_HOST env var in others containers to make them discoverable
@mathroc
mathroc / unused_port.php
Created September 17, 2014 13:54
Find unused port (cli - php)
#!/usr/bin/php
<?php
$address = '127.0.0.1';
// Create a new socket
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
// Bind the source address
socket_bind($sock, $address);
@mathroc
mathroc / dabblet.css
Created August 5, 2013 20:18
CSS is awesome
/**
* CSS is awesome
*/
div {
border: 2px solid black;
width: 84px;
height: 84px;
text-transform: uppercase;
padding: 11px;