Archive for the ‘Truques e Dicas’ Category

svn add recursivo

o add do svn não é nativamente recursivo, o que é chato.

ora nada que uma pesquisa no google não resolva:

svn status | grep ‘^\?’ | sed -e ’s/^? *\(.*\)/\1/;s/ /\\ /g’ | xargs svn add

um pouco de magia sed e ‘tá a dar.

free online touch typing speed test

Façam também o vosso em: typeonline.co.uk/typingspeed.php |:

PS: wpm significa words per minute.

usernamecheck.com

Depois não digam que não dou links giros: usernamecheck.com

Linux. Memory. Cache.

The reason Linux uses so much memory for disk cache is because the RAM is wasted if it isn’t used. Keeping the cache means that if something needs the same data again, there’s a good chance it will still be in the cache in memory. Fetching the information from there is around 1,000 times quicker than getting it from the hard disk. If it’s not found in the cache, the hard disk needs to be read anyway, but in that case nothing has been lost in time.

To see a better estimation of how much memory is really free for applications to use, run the command free -m.

The -/+ buffers/cache line shows how much memory is used and free from the perspective of the applications. Generally speaking, if little swap is being used, memory usage isn’t impacting performance at all.

Ok, isto da cache é muito bonito, giro e tal. Mas, ás vezes, consome o que não quero. Solução? Ora, faço isto (como root, obviamente): echo 3 > /proc/sys/vm/drop_caches

Normalmente ajuda.

Vim Colors

Amiguinhos, guardem isto nos vossos bookmarks: yukihiro.nakadaira.googlepages.com/vim-color.html, eu já o tenho no meu delicious.

Quem não quiser perder tempo a fazer o seu esquema de cores, tem sempre o: cs.cmu.edu/~maverick/VimColorSchemeTest/index-c.html, este não guardei no meu delicious.

Gmail https

O Google deve ter lido o que o raca escreveu aqui, dado que agora existe isto:

gmail https

Mais informações: é aqui.

Vim, lol

ponto ~ $  echo "hello world" > lol.txt
ponto ~ $  vim -c "+s/hello/vim" -c "+wq" lol.txt
ponto ~ $  cat lol.txt
vim world

lol, funciona.

ps: aparentemente o ‘-c’ não é necessário.

Syntax Check

Esta dica poderá servir de alguma coisa a todos os que brincam/trabalham regularmente com linguagens de scripting.

ponto ~ $ perl -c teste.pl
teste.pl syntax OK

ponto ~ $ php -l teste.php
teste.php syntax OK

ponto ~ $ ruby -c teste.rb
teste.rb syntax OK

Para python não sei |:

You are currently browsing the archives for the Truques e Dicas category.