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
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'))

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:

@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>
/**
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:
./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
{
# These benchmarks are testing https://github.com/pyrates/roll/tree/master/benchmarks
# on a MacBook Air 2013 OSX 10.12.3 - 1.3 GHz Intel Core i5 - 8 GB 1600 MHz DDR3
./bench.sh
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Running bench with ab for aiohttp
HTTP/1.1 200 OK
Content-Length: 25
Content-Type: text/plain; charset=utf-8
Date: Tue, 10 Oct 2017 14:42:45 GMT
<!-- Proposition de styleguide simple pour Cafebabel. -->
<!doctype html>
<meta charset=utf-8>
<title>Cafebabel Styleguide</title>
<h1>Titre</h1>
<h2>Sous-titre</h2>
<template>
<div>
<router-link to=/>Revenir aux résultats</router-link>
<div :if="result !== null">
<!-- debugResults : {{singleResult}} -->
<p>Nom entreprise : {{result.nom_raison_sociale}}</p>
<ul>
<li> Siret : {{result.siret}}</li>
<li> Siren : {{result.siren}}</li>
<li> Clef NIC : {{result.nic}}</li>
@vinyll
vinyll / components.js
Created June 28, 2017 19:47
Custom native webcomponents demo
class Component extends HTMLElement {
constructor() {
super()
this.onclick = event => this.click(event)
this.props = this.getProps()
for(let prop in this.props) {
if(this.hasAttribute(prop)) {
this.props[prop] = this.getAttribute(prop)
}
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvteWc1BFLkL/AE0Ylv0wtd+EdUfkBQxcVm1wujOYXhegUeGmxA5Huiy+JHZ7t891a53P21PASnOSZvTrmHHw7W3QcMMHnb5UqMbtP3ZBug5aa9aG+bxxxNiCDIVcDE+kwIp0CwoXFc8o+b9HS9dzbu7BUex/GtUPKYJCpzkWNsC2wxQTJ5N9MrzMNZC5SyacOt26oiNWLOdMJ66/TUcONHzgIRXRKiro2srvvLzkhXDNM66I/HCCgyk7psF073FSUaRqrN4fEf8hPL5mJxwOldy810knYr7gxWnPF86wyl4spKb4z04mFZa5iEjrgJSa+eSQs3DI5zELB5J4ah7wqw== vinyll@vinyll-laptop