Skip to content

Instantly share code, notes, and snippets.

View chicao's full-sized avatar
💭
WIP

Chicao Fernandes chicao

💭
WIP
View GitHub Profile
@chicao
chicao / [Mercurial] : Push aborted due to conflicts
Created July 5, 2016 18:44
[MERCURIAL] : Push problems due to conflicts and multiheads
It's not rare to mercurial 'push' commands return the annoying abort message:
$ hg push --rev <WORK_BRANCH>
pushing to <REPO URL>
searching for changes
abort: push creates new remote head <HEAD ID> on branch <WORK_BRANCH>!
Usually this means that you didn't updated your local repository with other programmers code.
The usual fix is to update your main branch by pulling changes, merge your local repository with remote changes,
commit the merge and then push to the remote repo:
@chicao
chicao / beautiful_idiomatic_python.md
Created May 22, 2017 00:59 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@chicao
chicao / super salários USP.py
Created October 11, 2017 13:51 — forked from fmasanori/super salários USP.py
Super Salários USP
"""
Autores:
Tiago Henrique da Cruz Pereira
João Felipe de Moraes Borges
"""
import threading
import time
import os
from urllib.request import urlopen
@chicao
chicao / language_development_envs.md
Last active October 15, 2019 18:31 — forked from andrew-h-lee/RVM-VirtualENV.md
# Self contained environment for programming languages

Isolating development environments by using language tools

RVM for Pythonistas, Virtualenv for Rubyists

For Python Developers: virtualenv, virtualenvwrapper or Buildout

Note: envs = environments

@chicao
chicao / iterm2.md
Created October 15, 2019 18:36 — forked from nobitagit/iterm2.md
iterm2 cheatsheet

This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number