#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
# syntax = docker/dockerfile:1.4.0 | |
FROM node:20 | |
WORKDIR /root | |
RUN npm install sqlite3 |
⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
hack_datasus <- function(sistema, modalidade, tipo_arquivo, ano, UF, mes){ | |
#Função gera dataframe a partir de ftp feita na página do datasus | |
#sistema ex:'SIHSUS' Verificar os sistemas disponíveis em http://www2.datasus.gov.br/DATASUS/index.php?area=0901&item=1 | |
#modalidade 'dados' | |
#tipo_arquivo ex: 'RD'#Varia conforme o sistema | |
#ano ex: 17 Dois últimos dígitos do ano | |
#UF ex:'AL' Sigla de UF Brasileira | |
#mes ex:'12' strings entre 01 e 12 |
code;name | |
01;Personal Care Activities | |
0101;Sleeping | |
0102;Grooming | |
0103;Health-related self care | |
0104;Personal Activities | |
0105;Personal Care Emergencies | |
0199;Personal care, n.e.c.* | |
02;Household Activities | |
0201;Housework |
// getComponent is a function that returns a promise for a component | |
// It will not be called until the first mount | |
function asyncComponent(getComponent) { | |
return class AsyncComponent extends React.Component { | |
static Component = null; | |
state = { Component: AsyncComponent.Component }; | |
componentWillMount() { | |
if (!this.state.Component) { | |
getComponent().then(Component => { |
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=php_cache:100m inactive=1d; | |
fastcgi_cache_key "$scheme://$host$request_uri"; | |
server { | |
listen 80; | |
server_name montefuscolo.com.br www.montefuscolo.com.br; | |
return 301 https://montefuscolo.com.br$request_uri; | |
} | |
server { |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
meu_tema <- function(base.size = 9, legend.text.size = 9, axis.text.size = 10, axis.title.size = 11) { | |
# exemplo da função lm | |
#ggplot(agua_agregado, aes(x = dif_pressao, y = vazao_massica_media)) + | |
# geom_point() + geom_smooth(method = "lm") + |