Archive for the ‘Truques e Dicas’ Category

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 |:

Ext4 - too long a post for twitter

visto que isto não cabe no meu twitter:

If you’ve ever felt constrained by the fact that a directory can only hold 32,000 subdirectories in ext3, you’ll be relieved to know that this limit has been eliminated in ext4.

Geeks do anime em 400k pedaços, arquivadores do /b/, rejubilem!

Não vou fazer a review, longe de mim querer armar-me em connoisseur. : >
Leiam isto, se quiserem

Vídeos bloqueados no Youtube

Ok. A quantos de vós já apareceu uma mensagem de erro a dizer que não podem ver o vídeo por razão x, y, z?

Sendo que x, pode ser a mensagem de erro que avisa que para o vídeo em questão é preciso estar com uma sessão autenticada e ter mais que 18 anos. Em que y, pode ser a mensagem, que diz que o vídeo está proibido no nosso pais. E por fim z, pode ser etc, ou seja, outras quaisquer mensagens de erro.

Ora, em vez de usarem o endereço: http://www.youtube.com/watch?v=id_do_video, usem antes o endereço http://www.youtube.com/v/id_do_video.

Assunto resolvido.

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