Skip to content

Instantly share code, notes, and snippets.

View vinyll's full-sized avatar
🗺️
Creating locally

Vincent Agnano vinyll

🗺️
Creating locally
View GitHub Profile
./bench.sh wrk
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Running bench with wrk for aiohttp
HTTP/1.1 200 OK
Content-Length: 25
Content-Type: text/plain; charset=utf-8
Date: Tue, 10 Oct 2017 15:40:36 GMT
Server: Python/3.6 aiohttp/2.2.4
{
/**
Simple string literal for native JS text literal substitution.
`literal(string, context)` where:
- `string` is a string that may contains literal string variables or functions wich be evaluated.
- `context` is the variable context object. Any reference to `this` in the `string` argument will
refer to the `context` object.
Example:
@vinyll
vinyll / index.html
Created November 25, 2017 12:05
Basic funtional approach of websomponents
<meta charset=utf8>
<script src=https://cdn.rawgit.com/chjj/marked/8f9d0b72/marked.min.js></script>
<main>
<h1>Welcome</h1>
<div>
${x_avatar(this.username, 'https://framagit.org/vinyll')}
</div>

Keybase proof

I hereby claim:

  • I am vinyll on github.
  • I am vinyll (https://keybase.io/vinyll) on keybase.
  • I have a public key whose fingerprint is B885 E5D3 1604 7742 9223 6397 A90A 5730 8249 6115

To claim this, I am signing this object:

import os
import sys
from pathlib2 import Path
import argparse
root_dir = Path(__file__).absolute().parent.parent
sys.path.append(str(root_dir))
sys.path.append(str(root_dir / 'apps'))
sys.path.append(str(root_dir / 'libs'))
@vinyll
vinyll / git-branch-sort.md
Last active July 26, 2021 07:07
Add the `git branch-sort` command to sort all branches by date.
git config --global alias.branch-sort "for-each-ref --sort=-committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"

## Novembre

Total : 1j

29/11 : .5j

  • rencontre école Freinet

22/11 : .5j

  • réunion d'équipe
@vinyll
vinyll / countrycodes.js
Last active October 12, 2018 09:57
List of ISO 3166-1 alpha 2 letter country codes, lower cased
/**
List of ISO 3166-1 alpha 2 letter country codes, lower cased.
Taken from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
*/
const countryCodes = [
['ad', "Andorra"],
['ae', "United Arab Emirates"],
['af', "Afghanistan"],
['ag', "Antigua and Barbuda"],
['ai', "Anguilla"],
@vinyll
vinyll / labyrinth.html
Created January 13, 2019 13:54
A labyrinth in a single line of JS
<body style="line-height: 18px; font-size: 18px;border: 1px solid #000; display: inline-block">
<script>
document.write([...Array(30)].map(_ => [...Array(30)].map(_ => (Math.floor((Math.random() * 2) % 2)) ? '╱' : '╲').join('')).join('<br>'))
</script>
</body>
@vinyll
vinyll / gist:f582b0d4edcbd78d3eaec147f99f60c5
Created February 18, 2019 21:08
Install ruby gems locally
export GEM_HOME=$PWD/gems
export PATH=$PWD/bin:$PATH
export RUBYLIB=$PWD/lib:$RUBYLIB