Skip to content

Instantly share code, notes, and snippets.

@Irio
Irio / amendments.csv
Last active December 28, 2017 01:12
Emendas de deputados federais ao orçamento da União (código-fonte em github.com/Irio/budget)
We can't make this file beautiful and searchable because it's too large.
achievement,achievement_code,additional_value,author,author_page_summary,category,department,destination,file_generation_date,file_generation_time,intervention,intervention_code,justification,location,number,proposed_wording,reference,total_page_summary,type,commitment_info_url,url
Implantação/Aparelham/Adequação Unid Saúde/ Aquis Unid Móvel,552,5.343.000,3230 - Jaime Martins,1 de 13,Individual,Saúde,ESPELHO DE EMENDA DE APROPRIAÇÃO DE DESPESA,2013-12-02,22:03,Atenção Especializada:Hospitais/Policlínicas/Unid.Especializ,003,,3100000 - Minas Gerais,32300001,,,3497 de 8807,Apropriação - Inclusão,http://inteligenciadenegocios3.camara.gov.br/painel/redirectorcamento.jsp?urlbo=iDocID=79334%26sOutputFormat=P%26sRefresh=Y%26lsSANO=2009%26lsSMES=12%26lsSORGAO=%26lsSUO=55901%26lsSACAO=2B31%26lsSSUBTITULO=0031,http://www.camara.gov.br/internet/comissao/index/mista/orca/orcamento/or2009/emendas/despesa/DANIELRJ_AV_LOA_AUTOR2_3230.pdf
Implantação/Aparelham/Adequação Unid Saúde/ Aquis Unid Móvel,552,2.000.000,3230 - Jaime
@vxhviet
vxhviet / regex.md
Created August 8, 2017 04:03
Regular Expression to find a string included between two characters while EXCLUDING the delimiters

Source: StackOverflow

Question: Regular Expression to find a string included between two characters while EXCLUDING the delimiters

Answer:

Easy done:

(?<=\[)(.*?)(?=\])

@davydany
davydany / IPTABLES-CHEATSHEET.md
Last active September 4, 2024 07:05
IP Tables (iptables) Cheat Sheet

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.

@jacob-beltran
jacob-beltran / requestAnimationFrame.js
Last active April 17, 2020 04:05
React Performance: requestAnimationFrame Example
// How to ensure that our animation loop ends on component unount
componentDidMount() {
this.startLoop();
}
componentWillUnmount() {
this.stopLoop();
}
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin

This is a proposal for a lightning talk at the Reactive 2016 conference. If you like this, star the Gist.


Thinking metrics on React applications

In regular websites, it is common to send multiple events to track user clicks. Single Page Applications change the way you look at metrics. This is a talk about a simple pattern we created at Globo.com to manage a metrics layer for http://globoplay.globo.com. The talk will cover how to track user flow using Google Analytics and other services. We solved the challenge of tying metrics and components, keeping information across pages and having global data. Also some React, React Router and React Side Effects concepts like context, higher order components, history state will be covered.

@Irio
Irio / notes
Last active August 15, 2016 13:23
Meetup Data Science Workflow: Data Preparation, Analysis & Visualization 13/08/2016 - RS Data Science Meetup
## Apache Spark DataFrames
Cristofer Weber
Data Scientist @ NeoGrid
Mestre em Ciencia da Computação pela PUC-RS
Garantem que supermercados tenham problemas com estoque mesmo não mantendo um gigante.
~~DataFrames~~ Dataset[Row]
@jesstelford
jesstelford / event-loop.md
Last active August 27, 2024 02:04
What is the JS Event Loop and Call Stack?

Regular Event Loop

This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)


Given the code

@hassy
hassy / lambda.js
Last active September 19, 2022 17:20
Different behavior of context.succeed() vs callback() in AWS Lambda
//
// Lambda's timeout needs to be >5 seconds, 10 should do
//
var startedAt = new Date();
var interval = setInterval(function () {
console.log(startedAt, new Date());
}, 1000);
@Irio
Irio / gist:7db611b0fcc67a3334249abdc10e6026
Created April 20, 2016 21:05
Meetup PyData Berlin 20/04 - April 2016 Meetup
EyeQuant - market tool for understanding how pages work. heatmaps. how clean or cluttered you design seems. collect data about human reactions to try to predict the perception of a new design
PyData Berlin Conference is open. May 21
Frankfurter Tor
BERLIN.PYDATA discount code for the conference. 20% discount
## (Jose Quesada) Distributed processing of large graphs in Python
Director @ Data Science Retreat