Skip to content

Instantly share code, notes, and snippets.

View aabril's full-sized avatar

Albert Abril aabril

View GitHub Profile
@Mau5Machine
Mau5Machine / docker-compose.yml
Last active July 4, 2024 16:57
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@Rich-Harris
Rich-Harris / footgun.md
Last active July 8, 2024 03:54
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@isaacs
isaacs / st.js
Created August 9, 2012 20:41 — forked from max-mapper/readme.md
node simple static router
var st = require('st')
var mount = st({
path: 'resources/static/',
url: 'static/', // defaults to path option
cacheSize: 1024*1024*1024, // 1GB memory cache. default = 0
fdCacheSize: 1024, // number of fd's to cache. default = 1024
index: true, // show an html index for dirs
index: 'index.html', // use index.html for dirs, if present
cacheExpiry: 10*60*1000, // expiration of contentCache in ms
serveStale: true // update in the background,
@lucasdavila
lucasdavila / example_use_gravatar_image_tag.py
Last active July 7, 2021 01:06
Gravatar em 3 linhas com python
print gravatar_image_tag('some.gravatar.email@foo.com', 32, {'class' : 'avatar', 'alt' : 'your gravatar'})
<img src="http://www.gravatar.com/avatar/3b4d33514d78047bf86307ab354658df?size=32" alt="your gravatar" class="avatar" />