Skip to content

Instantly share code, notes, and snippets.

Avatar
💜

Pedro Medeiros pedrosnk

💜
View GitHub Profile
View Reactive Conf - Thinking metrics on React applications.md

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.

@aldenks
aldenks / fish shell: docker-machine env default
Last active Jan 13, 2016
Fish shell command to configure shell for default vm
View fish shell: docker-machine env default
eval (docker-machine env default | sed 's/export/set -x/g' | sed 's/=/ /g' | tr '\n' ';')
@tokenvolt
tokenvolt / simple_form_bootstrap3.rb
Last active Apr 28, 2020
Bootstrap 3 simple form initializer
View simple_form_bootstrap3.rb
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@pedrosnk
pedrosnk / .vimrc
Last active Feb 4, 2016
My bash_profile color configuration on OSX
View .vimrc
set ts=2 sw=2 sts=2
"Expand column 80:w
"let &colorcolumn=80
let &colorcolumn=join(range(81,999),",")
"Hilight extra whitespace
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
View test_tco.rb
require 'minitest/autorun'
###
# Test to demonstrate TCO in Ruby. Tested in 1.9.2+
class TestTCO < MiniTest::Unit::TestCase
code = <<-eocode
class Facts
def fact_helper(n, res)
if n == 1
res