Skip to content

Instantly share code, notes, and snippets.

View pedrosnk's full-sized avatar
💜

Pedro Medeiros pedrosnk

💜
View GitHub Profile

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 January 13, 2016 21:11
Fish shell command to configure shell for default vm
eval (docker-machine env default | sed 's/export/set -x/g' | sed 's/=/ /g' | tr '\n' ';')
@tokenvolt
tokenvolt / simple_form_bootstrap3.rb
Last active November 2, 2023 11:55
Bootstrap 3 simple form initializer
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@pedrosnk
pedrosnk / .vimrc
Last active March 12, 2024 14:33
My bash_profile color configuration on OSX
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\+$/
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