Skip to content

Instantly share code, notes, and snippets.

View wagnerjgoncalves's full-sized avatar
Happy

Wagner Gonçalves wagnerjgoncalves

Happy
View GitHub Profile
{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 4,
"caret_style": "solid",
"theme": "Material-Theme.sublime-theme",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
@wagnerjgoncalves
wagnerjgoncalves / factorial.rb
Created July 7, 2015 17:25
Factorial using Hash
factorial = Hash.new do |hash, key|
if key > 1
hash[key] = hash[key - 1] * key
else
hash[key] = 1
end
end
factorial[1] # 1
factorial[2] # 2

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

Backbone.js

backbone

Introduction

  • A library designed to be minimalist and useful in a wide variety of situations (non-opinionated)
  • Based in events communication/syncronization
  • Based in MVC (Model-View-Controller) structure

Structure

@wagnerjgoncalves
wagnerjgoncalves / notes.md
Last active April 28, 2016 00:43
Notes from Crafiting Rails 4 Applications

Crafiting Rails 4 Applications

  • This pioneering book deep-dives into the Rails plugin APIs and shows you, the intermediate Rails developer, how to use them to write better web applications and make your day-to-day work with Rails more productive.

  • You’ll learn how the Rails rendering stack works and customize it to read templates from the database while you discover how to mimic Active Record behavior, such as validations, in any other object. You’ll find out how Rails integrates with Rack, the different ways to stream data from your web application, and how to mix Rails engines and Sinatra applications into your Rails apps, so you can choose the most appropriate tool for the job. In addition, you’ll improve your productivity by customizing generators and responders.

Cap 1 - Create your own renderer (AbstractController)

Rails uses the model-view-controller (MVC) architecture pattern to organize our code.

{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"auto_complete_with_fields": true,
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 4,
"caret_style": "solid",
"color_scheme": "Packages/User/itg.dark (Flake8Lint).tmTheme",

List of Rails Status Code Symbols

1xx Informational

100	Continue              :continue
101	Switching Protocols   :switching_protocols
102	Processing            :processing
@wagnerjgoncalves
wagnerjgoncalves / vaga_front_end.md
Last active February 7, 2017 16:46
Vagas Tuneduc

Vaga de Front-End (Júnior/Pleno)

A Tuneduc

Dados empoderam as pessoas para tomarem melhores decisões em Educação. Pode ser um pai atrás de informação para escolher a escola dos filhos, um aluno que descobre sua nota no Enem com meses de antecedência ou uma escola que sabe exatamente o que trabalhar em sala de aula para potencializar a aprendizagem. É nisso que a Tuneduc acredita.

Aqui, engenheiros, designers, economistas, educadores e outros apaixonados por educação analisam dados e constroem plataformas digitais. São soluções que estão no dia a dia de mais de 600 escolas, em algumas das maiores redes públicas do país e no celular de 300 mil alunos.

O que buscamos

List of Rails Status Code Symbols

1xx Informational

100	Continue	           :continue
101	Switching Protocols	:switching_protocols
102	Processing	         :processing
@wagnerjgoncalves
wagnerjgoncalves / example_rdd_api.py
Last active August 31, 2018 13:24
Pyspark using SparkContext example
# -*- coding: utf-8 -*-
"""
Example of Python RDD with SparkContext
"""
import csv
from pyspark import SparkContext
from pyspark.conf import SparkConf
from collections import OrderedDict