Skip to content

Instantly share code, notes, and snippets.

View andrecunha's full-sized avatar

Andre Cunha andrecunha

View GitHub Profile
@cmizony
cmizony / vimrc
Last active February 10, 2024 20:58
Vim - Opinionated configuration
" _____ __ __ _____ __________ _ ___ __ _
" / ____| \/ |_ _|___ / __ \| \ | \ \ / / (_)
" | | | \ / | | | / / | | | \| |\ \_/ / ______ __ ___ _ __ ___ _ __ ___
" | | | |\/| | | | / /| | | | . ` | \ / |______| \ \ / / | '_ ` _ \| '__/ __|
" | |____| | | |_| |_ / /_| |__| | |\ | | | \ V /| | | | | | | | | (__
" \_____|_| |_|_____/_____\____/|_| \_| |_| \_/ |_|_| |_| |_|_| \___|
"
"
" 1. Easy navigation in .vimrc:
" Use <Leader>ig to view indentation guides
@sloria
sloria / bobp-python.md
Last active April 13, 2026 11:23
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 22, 2026 00:37
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jboner
jboner / latency.txt
Last active April 22, 2026 03:05
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@bradmontgomery
bradmontgomery / rvm_apache_passenger.txt
Created January 10, 2012 04:45
RVM + Apache + passenger setup for Ubuntu
# Install rvm system-wide
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
# Update the packages
apt-get update
apt-get upgrade
apt-get install build-essential
# get the packages required by ruby
rvm pkg install zlib
@ewheeler
ewheeler / gist:1262989
Created October 4, 2011 22:12
flask + tornado + nginx + supervisord
# create stub, then run flask app in tornado on port 5000 (perhaps with supervisord config below http://supervisord.org/index.html)
#!/usr/bin/env python
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from myflaskapp import app
http_server = HTTPServer(WSGIContainer(app))