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 / zram.sh
Created January 6, 2012 16:48
How enable zram module on kernel (debian lik distro)?
#!/bin/bash
### BEGIN INIT INFO
# Provides: zram
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Increased Performance In Linux With zRam (Virtual Swap Compressed in RAM)
# Description: Adapted from systemd scripts at https://github.com/mystilleef/FedoraZram
### END INIT INFO
@voyeg3r
voyeg3r / wma2mp3.sh
Created January 31, 2012 13:21
Convert wma to mp3
#! /bin/sh
# wma to mp3 script
# source: http://ubuntuforums.org/showthread.php?p=2851469
mkdir -p converted_mp3
cp *.wma converted_mp3
cd converted_mp3
# How many files to make the progress bar
PROGRESS=0
@voyeg3r
voyeg3r / gist:51031
Created January 23, 2009 14:47
vimrc for windows
" Arquivo de configuração do vim"{{{
" Criado: Qua 02/Ago/2006 hs 09:19
" Last Change: 23-01-2009 08:32:53
" Autor: Sergio Luiz Araujo Silva
" Codificação: utf-8
" Download: http://dotfiles.org/~voyeg3r/.vimrc
" Licence: Licença: Este arquivo é de domínio público
" Garantia: O autor não se responsabiliza por eventuais danos
" causados pelo uso deste arquivo.
@voyeg3r
voyeg3r / fastnetwork.sh
Created June 2, 2010 12:54
fastast network config
#!/bin/bash
# Criado em:Qua 02/Jun/2010 hs 09:18
# Last Change: Qua 02/Jun/2010 hs 09:18
# vim:ft=sh:fdm=syntax:nu:
# Instituicao: none
# Proposito do script: agilizar configurações de rede
# Autor: Sérgio Luiz Araújo Silva
# site: http://vivaotux.blogspot.com
#net.core.rmem_max=8388608
@voyeg3r
voyeg3r / sysctrl.conf
Last active September 14, 2019 10:29
desempenho de reded
# /etc/sysctrl.conf
# references:
# https://klaver.it/linux/sysctl.conf
# https://wiki.archlinux.org/index.php/Sysctl
# wget -c https://raw.github.com/gist/368407/ -O - > /etc/sysctrl.conf
# ( O O )
# +===========oOO==(_)==OOo==============+
# | |
@voyeg3r
voyeg3r / ultisnips_custom.vim
Created April 2, 2019 20:30
ultisnips_custom
" File: ultisnips_custom.vim - Custom UltiSnips settings
" Maintainer: Sergio Araújo
" Oririnal Creator: Noah Frederick
" Last Change: abr 02 2019 17:24
" Place it at: after/plugin/ultisnips_custom.vim
"
" esse script está funcionando standalone
" ou seja sem interação com outros que não sejam
" os que já vem com o sistema e insere templates zsh, sh, python etc.
@voyeg3r
voyeg3r / gist:319980
Created March 2, 2010 21:38
python - Le um arquivo delimitado e mostra os campos na tela.
""" Le um arquivo delimitado e mostra os campos na tela.
source: http://aprenda-python.blogspot.com/2008/10/exemplo-3-ler-arquivo-csv-e-mostrar.html
"""
import csv
print __doc__
f = csv.reader(open('fones.txt'), delimiter=';')
for [nome,nasc,fone] in f:
print 'nome=%s | nasc=%s | fone=%s' % (nome,nasc,fone)
@voyeg3r
voyeg3r / xorg.conf
Created September 12, 2010 20:50
xorg.conf para linux mint baseado no debian - [SiS] 771/671
# xorg.conf (X.Org X Window System server configuration file)
# xorg.conf para linux Mint Debian Based - configuração para linux mint baseado no Debian
# funciona em placas sis
#VGA compatible controller: Silicon Integrated Systems [SiS] 771/671 PCIE VGA Display Adapter (rev 10)
#
# This file was generated by failsafeDexconf, using
# values from the debconf database and some overrides to use vesa mode.
#
@voyeg3r
voyeg3r / firefoxlock.sh
Created January 20, 2012 10:46
MOZILLA FIREFOX LOCKDOWN
#!/bin/bash
# trave opções do firefox
# file: /opt/firefox/mozilla.cfg
# References:
# http://www.pcc-services.com/kixtart/firefox-lockdown.html
# download: wget -c https://gist.github.com/raw/1646665/ -O /root/lockfirefox.sh && chmod +x $_
# gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /apps/firefox/lockdown/disable_show_passwords True
######################################################
" Reference: https://stackoverflow.com/a/24652257/2571881
" TODO: Reselect visual mode
" OBS: I was using --> exec 'normal! _"_2x'
" How to know if I have the optional space after the comment '[ ]?' ?
" because this influences the cursor position
" Now all comments are added at the beginning of line because other people want
" to uncomment and comment using visual block
" after that I should give some suggestions to [mike](https://stackoverflow.com/users/2839380/mike) at stackoverflow