Skip to content

Instantly share code, notes, and snippets.

View jonatasnona's full-sized avatar
🇧🇷
Working from home

Jonatas Pedraza jonatasnona

🇧🇷
Working from home
View GitHub Profile
@jonatasnona
jonatasnona / JS-Inheritance-5.js
Created July 25, 2012 12:52 — forked from nsisodiya/JS-Inheritance-5.js
JS-Inheritance-5.js
/* Author : Narendra Sisodiya
* Date : Thu Jul 19 18:16:38 IST 2012
* Licence : Public Code
* Purpose : Inheritance
*
*/
Function.prototype.inheritFrom = function (Base){
var F = function(){};
F.prototype = Base.prototype;
@jonatasnona
jonatasnona / gist:3502064
Created August 28, 2012 18:45
Git: removing obsolets branches
git remote prune origin
@jonatasnona
jonatasnona / gist:3502259
Created August 28, 2012 18:52
Git: diference between branches
git cherry -v <branch>
@jonatasnona
jonatasnona / gist:3503255
Created August 28, 2012 19:41
Git: clean repository
git clean -xdf
@jonatasnona
jonatasnona / .vimrc
Last active October 10, 2015 19:38
VIM: vimrc
" Vim Pathogen
runtime bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
" ##############################################
" # General Settings #
" ##############################################
if has ('cmdline_info')
@jonatasnona
jonatasnona / gist:3745094
Last active October 10, 2015 20:18
VIM: Plugins configuration
command-t
cd ~/.vim/bundle/command-t/ruby/command-t
# requires ruby 1.9.*
ruby extconf.rb
make
syntastic
@jonatasnona
jonatasnona / gist:3916039
Last active April 29, 2018 03:43
Git: Commands
# guardar comando de push para o origin depois de um 'git remote add'
git push -u origin master
# diferenças entre as alterações locais e o HEAD
git diff HEAD
# mostra apenas a diferença no staged
git diff --staged
# remove do staged
@jonatasnona
jonatasnona / frontend-templating.md
Created October 22, 2012 13:32
Front-end Templating

Front-end templating

Introduction

Using the concept of templating in the browser is becoming more and more wide-spread. Probably the main reason to this is the move of application logic from the server to the client, in tandem with the increasing usage of the MVC pattern. Templates can be extremely useful in client-side development, especially to separate markup and logic in views.

There are plenty of definitions of the term "template", here is a good one from foldoc (http://foldoc.org/template):

A document that contains parameters, identified by some special syntax, that are replaced by actual arguments by the template processing system.

@jonatasnona
jonatasnona / gist:4049574
Last active October 12, 2015 15:38
Git: environment branch colors
# put this in bashrc
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\]$(__git_ps1 " [%s]")\[\033[0m\] \[\033[00m\]$ '