Skip to content

Instantly share code, notes, and snippets.


Felipe Arruda Pontes arruda

View GitHub Profile

Keybase proof

I hereby claim:

  • I am arruda on github.
  • I am felipearruda ( on keybase.
  • I have a public key whose fingerprint is 3254 CD16 FC1F 3F85 5FC8 05A9 A17A E420 0913 706D

To claim this, I am signing this object:

arruda / relax.js
Created Mar 30, 2018 — forked from SoreGums/relax.js
CouchDB Map/Reduce Example
View relax.js
// Data
{"_id":"pvg:IHC09A","_rev":"1-3881006720","nvic":"IHC09A","family":"159","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:IJU09A","_rev":"1-243536901","nvic":"IJU09A","family":"147","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:IJV09A","_rev":"1-3794903136","nvic":"IJV09A","family":"147","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:IJY09A","_rev":"1-1301614913","nvic":"IJY09A","family":"147","couchrest-type":"GRD::Pvg","make":"ALFA ROMEO"},
{"_id":"pvg:J3X09A","_rev":"1-1398113861","nvic":"J3X09A","family":"V8","couchrest-type":"GRD::Pvg","make":"ASTON MARTIN"}
// Map
arruda / fig.yml
Created Jan 26, 2015
Fig with PG
View fig.yml
image: postgres:9.3
- POSTGRES_USER=postgres
- /var/lib/postgresql/data
- "5432:5432"
arruda /
Last active Aug 29, 2015
Django Python Web Framework Best Practices

Read this before you post something:

  1. The group is not here to do your homework.

Don't expect others to do everything for you, be it your homework or your job. So try doing something first!

  1. Share code nicely.

If you want to share a code, or need help with it, then put it in or something similar. This way others can have a better understanding of what your code is about.

View insertionSort.cpp
void InserctionSort(int n, int vetor[]){
int j,i, chave;
for(j = 1; j < n; j++){
chave = vetor[j];
i = j - 1;
while(i >= 0 && vetor[i] > chave){
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/home/lanchinho/blablabla/tutorial/db.sqlite' ,
'USER': '',
'HOST': '',
'PORT': '',
arruda / helloworld.rst
Created May 14, 2013
Hovercraft! Examples.
View helloworld.rst
title:Hello World!

This is a simple Hello world example for hovercraft!

This is the First Slide:

Some text here in this slide...

arruda /
Created Mar 26, 2013
Usar RequestContext no Lugar de Context em testes onde for necessário renderizar um template manualmente. Se não usar o RequestContext ele ignora alguns, senão todos os TEMPLATE_CONTEXT_PROCESSORS, e não renderiza como deveria ou dependendo da template em questão, ele nem roda...
# -*- coding: utf-8 -*-
from lxml import html as lhtml
from django.template import Context, Template, RequestContext
from django.test import RequestFactory
factory = RequestFactory()
class TestTemplate(AlgumTestCase):
View startproject --template= --extension="md,py" myproject
arruda / awk_primo.awk
Created Dec 6, 2012
AOU exercicio awk
View awk_primo.awk
for (div = 2; div*div <= num; div++)
if (num % div == 0)
if (num % div == 0)
printf "%d nao eh primo\n", num
printf "%d eh primo\n",num}