Skip to content

Instantly share code, notes, and snippets.

View voyeg3r's full-sized avatar

Sérgio Luiz Araújo Silva voyeg3r

View GitHub Profile
@voyeg3r
voyeg3r / rc.conf
Created February 2, 2009 18:39
Configuração de ambiente no arch linux
# voyeg3r at gmail
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
"Que tal calcular expressões do seu texto com shift-f1
"talvez tenhamos que melhorar para pegar mais de uma expressão
"na linha, já vi inclusive funções que chamam o 'bc' mas assim
"não tem graça.
map <s-f1> <esc>0"myEA=<c-r>=<c-r>m<enter><esc>
" Este mapeamento é para o modo normal usando shift-f1
" <esc> ........... normal
" 0 ............... começo da linha
@voyeg3r
voyeg3r / gist:76029
Created March 9, 2009 01:00
calculadora científica no vim
" calculadora científica no vim
" url: http://vivaotux.blogspot.com/2009/03/calculadora-cientifica-com-o-vim.html
" se tem suporte a python no vim
:command! -nargs=+ Calc :py print <args>
:py from math import *
" se você não tem suporte a python no vim mas tem o python instalado faça:
command! -nargs=+ Calc :!python -c "from math import *; print <args>"
" para ler mais dicas como esta: http://code.google.com/p/vimbook
// :sav! ~/.mozilla/firefox/*.default/user.js
// Arquivo: user.js configuração do firefox 3.5
// Criado: Sex 19/Jun/2009 hs 13:53
// Last Change: Sex 19/Jun/2009 hs 13:53
// autor: Sérgio Luiz Araújo Silva
//
user_pref("browser.startup.homepage"; http://www.google.com);
// user_pref("browser.startup.page", 1); // se estive em 1 usa proxy
// user_pref("network.proxy.backup.ftp", "192.30.10.248");
// user_pref("network.proxy.backup.ftp_port", 3128);
@voyeg3r
voyeg3r / gist:141674
Created July 6, 2009 20:55
instalar o inkscape 0.47 no linux educacional
#!/bin/bash
# Criado em:Seg 06/Jul/2009 hs 17:53
# Last Change: Seg 06/Jul/2009 hs 17:53
# vim:ft=sh:fdm=syntax:nu:
# Instituicao: cpqt
# Proposito do script: instalar o inkscape 0.47 no linux educacional
# Autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
# para instalar manualmente siga este link
@voyeg3r
voyeg3r / bigfiles.py
Created August 11, 2009 17:52
bigfiles.py
#!/usr/bin/env python
# bigfiles.py - Generate a list of the largest files within a subdir
# Copyright (C) 2007 Dan Noe / isomerica.net
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@voyeg3r
voyeg3r / getpopular.py
Created March 2, 2010 15:12
getpopular - get popular tags from delicious
#!/usr/bin/env python
# # -*- coding: UTF-8 -*-
# Criado em:Ter 02/Mar/2010 hs 11:58
# Last Change: Ter 02 Mar 2010 18:18:43 BRT
# vim:ft=python:nolist:nu:
# Instituicao: none
# Proposito do script: pesquisar tags populares no delicious
# Autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
@voyeg3r
voyeg3r / gist:322039
Created March 4, 2010 19:35
iterações com a biblioteca itertools
# First, import itertools:
# source: http://stackoverflow.com/questions/104420/how-to-generate-all-permutations-of-a-list-in-python
import itertools
# Permutation:
print list(itertools.permutations([1,2,3,4], 2))
[(1, 2), (1, 3), (1, 4),
(2, 1), (2, 3), (2, 4),
@voyeg3r
voyeg3r / gist:323655
Created March 6, 2010 12:03
apihelper python
#!/usr/bin/env python
# # -*- coding: UTF-8 -*-
# Criado em:Sáb 06/Mar/2010 hs 08:09
# Last Change: Sáb 06 Mar 2010 08:40:18 BRT
# vim:ft=python:nolist:nu:
# Instituicao: cpqt
# Proposito do script: apihelper - acesso à documentação dos módulos
# Autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
@voyeg3r
voyeg3r / gist:325090
Created March 8, 2010 11:48
instalar codecs
#!/bin/bash
# Criado em:Qui 23/Abr/2009 hs 22:58
# Last Change: Qua 24 Fev 2010 09:49:54 BRT
# vim:ft=sh:fdm=syntax:nu:
# Instituicao: none
# Proposito do script: instalar codecs e outros programas no ubuntu karmic 9.10
# Autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
# cabeçalho