Skip to content

Instantly share code, notes, and snippets.

@tacsio
tacsio / Makefile.sh
Created March 18, 2011 00:43
Makefile script django
run:
@python manage.py runserver 8000
createdb:
@python manage.py syncdb
clean:
@find . -type f -name "*.pyc" | xargs rm -rf
@clear
@tacsio
tacsio / Git Configs
Last active September 15, 2022 01:10
My git config
git config --global user.name "Tarcisio Coutinho"
git config --global user.email "tcs5cin@gmail.com"
git config --global color.ui true
git config --global alias.s status
git config --global alias.c checkout
git config --global alias.b branch
git config --global alias.lol log --oneline --graph --decorate
rand(38**8).to_s(36)
@tacsio
tacsio / links.textile
Created May 24, 2012 07:12 — forked from lucashungaro/links.textile
Links de referência utilizados em minha palestra
@tacsio
tacsio / gist:3066449
Created July 7, 2012 13:17
Compilar ns-2
Copie o arquivo de instalação (ns-allinone-2.34.tar.gz) para a pasta do usuário (ex: /home/tacsio). Depois entre no terminal e digite:
$ cd ~
$ tar xzvf ns-allinone-2.34.tar.gz
depois segue o que tem nesse link http://erl1.wordpress.com/2011/10/14/installing-ns-2-34-on-ubuntu-11-10-oneiric-ocelot/
aí depois de instalar faz o seguinte:
Passo 1: Copie o texto abaixo para um arquivo chamado ns-2.txt e grave na pasta home do usuário. (onde tem x substituir pelas versões que aparecem no final da instalação)
@tacsio
tacsio / gist:4115554
Created November 20, 2012 02:32
Solve color problem on git log command
export LESS="-erX"
Problem: ANSI chars on output
#!/bin/bash -
#===============================================================================
#
# FILE: script-completion.sh
#
# USAGE: ./script-completion.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
@tacsio
tacsio / git-show
Last active December 15, 2015 22:59
git show --pretty="format:" --name-only -r
git diff --name-status SHA1 SHA2
@tacsio
tacsio / ExtractMysql.sql
Last active December 17, 2015 09:09
Extract to file mysql
SELECT * FROM table
where attr = x
INTO OUTFILE '/home/tarcisio.coutinho/Shared/inicio.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY ''
LINES TERMINATED BY '\n'
#!/usr/bin/env R -
#===============================================================================
#
# FILE: moment_matching.R
#
# USAGE: R -f moment_matching.R --args [file]
#
# DESCRIPTION: Calculates moment matching of sample data
#
# OPTIONS: ---