My other pages
Other pages on this site
These are written in Portuguese:
Random things
Gentoo-related things
Configuration files
Some scripts I wrote
This section is being moved to its own page: My scripts
- add_machine.sh - Script to be used by Samba to automatically add machine accounts to UNIX passwd. It will add machine accounts starting with an specified UID (30000 by default), so they won't be mixed with normal user accounts. Uses awk to find the next available UID.
- chunk-decode.php - CLI PHP script to decode the raw data from a HTTP connection which transfers a file using Transfer-Encoding: chunked. It is useful to restore files when all you have is a dump from tcpdump/ethereal. (Note: This script does not parse tcpdump file, it only parses the raw HTTP data sent by server. You must use some other software, like ethereal, to isolate the server-to-client data. Read the script for more info.)
- ls2html.sh - Generates HTML code from current directory listing. Useful to run as:
ls2html.sh full > index.html
Some programs
Programming Contests
- NIOde - É um live-cd derivado do Knoppix, que foi usado na olimpíada de programação da Holanda (NIO). Eu recebi uma cópia desse CD como presente, na IOI2003.
- Olimpíada Brasileira de Informática
- Maratona de programação - DCC UFRJ
- Maratona de Programação
- USACO Training Program Gateway
- Programming Contest Guide - Preparing dor ACM/ICPC World Finals
- Sphere Online Judge (SPOJ) - an online judge accepting solutions in C, C++, Pascal, JAVA, Perl, Python, Ada, Smalltalk, Fortran, Assembler, Icon, Ruby, Pike, Haskell, Ocaml, Prolog, CLIPS, Whitespace, Intercal, Brainf**k
- TopCoder
- checar.html - Lista de coisas a serem checadas antes de submeter um problema na Maratona.
Valladolid
ACM-ICPC Live Archive
PKU JudgeOnline
Some ISOs
Random links
Random tips
- How to change keyboard layout:
setxkbmap -layout us_intl
- A more complete
setxkbmap line:
setxkbmap -rules xfree86 -model pc104 -layout us_intl -option ""
- How to make the Win key work on some distros:
setxkbmap -variant altwin:super_win
- List all files (including hidden), sorted by modification time:
ls -ltrAh
ls -trAsh
- List all files (including hidden), sorted by creation time:
ls -crAsh
- List all files (including hidden), sorted by size:
ls -SArsh
- Show disk usage of each file and directory (including hidden) inside current directory (sorted by size):
du -smc .[^.]* * | sort -n
du -skc .[^.]* * | sort -n
- Show disk usage of each directory (including hidden) inside current directory (sorted by size):
du -smc .[^.]*/ */ | sort -n
du -skc .[^.]*/ */ | sort -n
- Repeat one parameter a lot of times at command-line, without repeatly repeatly writing it, in bash (in following line, I wanted to print 5 copies of "SomeDocument.ps"):
lpr SomeDocument.ps{,,,,}
- Print the image size:
identify -format '%w %h %i'
- Discover if an image is corrupt or incomplete:
identify -format '' CORRUPTIMAGEHERE 2>&1 > /dev/null
- Put subtitles in black area below video, in mplayer (note: maybe you might need to tweak the numbers -100 and 50):
mplayer -vf expand=0:-100:0:50 -sub yoursubfile.srt yourmovie.avi
- Put subtitles in black area below video, in mplayer (improved version, will "expand" the video to fit 4:3 proportions), and also fix the volume:
mplayer -af volnorm=1 -vf expand=:::::4/3 -sub yoursubfile.srt yourmovie.avi
- Convert any audio file that mplayer can play (in this case, an AMR file recorded by a mobile phone) to WAV:
mplayer -ao pcm:fast:file=somefile.wav -vo null -vc null somefile.amr
- Reuse ssh connections
- Add this to ~/.ssh/config
Host *
ControlMaster auto
ControlPath ~/.ssh/control_master_%r@%h-%p