sábado, 19 de dezembro de 2009

Bash::VI Search Style (K)Ubuntu

How to configure your Bash(konsole) to do a search VI style. On your bash:


~$ cd
~$ vi .inputrc

# Vim style history search
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
# normal style - commented, so they'll not be used
# "\e[A": previous-history
# "\e[B": next-history

quarta-feira, 9 de dezembro de 2009

Queen - Bohemian Rhapsody::Muppets

Duas homenagens em Um:

SSH - Session Timeout

How to prevent SSH from session timeout (when you leave your connection idle for some time).
Just add this to ~.ssh/config:

# Preventing timeout de ligacao ssh
ServerAliveInterval 30
ServerAliveCountMax 6


source

quinta-feira, 1 de outubro de 2009

SpeedTouch - modem vulnerability

Something I just found out:

How to access to a SpeedTouch Administration Web Page!


You need to have access to one speedtouch web administration page.
Once you access it through you web browser just exit or, don't exit at all, without logging out. that is the important part.
After that you have to access the network where the other speedtouch is in, and which you want to access and don't know the password. Just type de web adminstration url and you're in.


Some notes:

this is probably because of a cookie validation that is not being done
just tested on 2 different speedtouch
used the url: http://speedtouch.lan for this

quarta-feira, 1 de julho de 2009

Poledit - Screen Saver template

This is a template created to use with poledit.exe which allows one to define in a policy the screen saver options.

- activating it
- prompt for password
- idle time

The idle time is pre-defined as 5 min., to change just edit the template, which is pretty much self explanatory.
The file can be found here

Based on MS KB 195655

sexta-feira, 26 de junho de 2009

VMWare 2.0.x web interface - remote console access

Problem:
Unable to connect to the MKS: Cannot connect to host localhost: Connection refused.


In order to use the the console provided in VMWare's web interface using an ssh tunnel, one needs to forward both port 8333 (web interface) and 902 (authentication daemon), assuming your using the default ports. Also note that you'll need to forward them as root, since they are privileged ports.
Example:

~# ssh _host_on_same_network_ -L 8333:vmware_host:8333 -L902:vmware_host:902


Then fire up your browser and access https://localhost:8333 and now you can freely use the console.


note. more about this

sexta-feira, 22 de maio de 2009

Nagios - Check Disk Mounted Disks

This was a development from a script found on unixdaemon. The purpose of this script is to validate the the partitions that are mounted and the partitions that are found on /etc/fstab. With this check one can prevent problems like, on reboot the partitions will not be mounted automatically, because they are not on fstab. Or validate if every partition found in fstab is currently mounted.
The original script from unixdaemon does not check partitions defined using Label or UUID, or even nfs. This was the "new" feature that i add.
Any comments or improvements are welcome.
ps. need to find some place to host the file :)
ps2. found it !

check_mounted_disks.pl

quinta-feira, 30 de abril de 2009

Squid : using LDAP groups to validate users access

Simple guide to show how one can use LDAP groups to set some acl's on Squid proxy.

All you'll have to do is edit the squid.conf file and add these entries:

external_acl_type ldapgroup %LOGIN /usr/lib/squid/squid_ldap_group -b "ou=Groups,dc=example,dc=local" -f "(&(cn=%g)(memberUid=%u))" -h ldap_server

Create a new external acl which validates if a user belongs to a ldap group

acl ldapgroup-domainallowed external ldapgroup google_allowed

This acl will validate if the user belongs to the group google_allowed. Notice that one could set multiple acl like this one, but to check other ldap groups.

acl domain_allow dstdomain google.com

Example of an acl which checks the domain destination

http_access deny domain_allow !ldapgroup-domainallowed

With this you'll only allow access to google to users which belong to group google_allowed

segunda-feira, 27 de abril de 2009

Windows Vista - Error 0x80072f8f

A few days ago a friend asked me to find out why IE was not loading gmail web page (IE could not found this page!). My first thought was:
"I'm almost sure it is being blocked either by IE filter or some kind of anti-virus program".
Unfortunately it was not the problem, although quite simple to solve, to discover the cause was not so simple.
Since with Firefox I had no problem accessing it, I assumed it had to be related with some IE configuration...
After some search i found that it had to do with the system date. Not only did it affected web pages that required certificates but also some other windows features like, windows defender update and date synchronize. It took me a while to figure it out since the problem was with the month, not the hour or the year, and it took me 3 checks before I noticed that ^_^

Perfect World - Don't Mess with a Venomancer

Hi,
For those who don't know, Perfect World is a free to download and play MMORPG, which, by the way, is quite good. It's a new approach to the video game market, and one that has been quite successful.

This video shows why you shouldn't mess with Venomancers:

sábado, 7 de março de 2009

Anime - Code Geass : Lelouch of the Rebellion (R1 and R2)

From now on, every once in a while I'll present some anime which I consider worth seeing.
And for my debut post, on this topic, I've choosen:
Code Geass : Lelouch of the Rebellion.
This was the last anime series that i watched, and I must say that I regret not having done this earlier. This was one of the best anime that I've seen.
For more about the series (plot, character, etc) please follow the link posted above.

domingo, 22 de fevereiro de 2009

Dragon Ball - Versão Portuguesa

E agora pa matar saudades dessa épica anime.
Quem não se recorda da Hype que foi essa série animada, mas para mim, como para muitos outros, por vezes sentíamos que havia algumas falas que não faziam muito sentido (ou, se calhar, faziam sentido a mais). Aqui fica um pequeno apanhado de algumas dessas "entradas" míticas.



Ps. nº 1 : Dr. Gero sobre Krillin - ".... olha o careca ...."

Christian Bale - O stress chega a todos!

Christian Bale, o actor do momento, presentemente a trabalhar num dos mais esperados projectos cinematográficos dos últimos tempos: Terminator Salvation

segunda-feira, 26 de janeiro de 2009

Firefox - Atalhos para buscas (entre outras coisas)

Como configurar o firefox para efectuar pesquisas usando atalhos na barra de endereços
Vou demonstrar um exemplo para uma busca no IMDb usando uma palavra chave que digitaremos na barra de endereços do firefox, juntamente com a palavra a pesquisar.

1º - Saber como é efectuada a busca no imdb
Para isso entramos no sítio do imdb e fazemos uma pesquisa ex:. "Matrix". Reparamos que na barra de endereços temos:
http://www.imdb.com/find?s=all&q=Matrix&x=0&y=0.
Daqui concluímos que a palavra a procurar é colocada na variável "q"

2º - Criar atalho
Para criar o atalho propriamente dito basta criar um bookmark de algo(pode ser vazio ou da própria página de pesquisa do imdb) e depois editamos as propriedades desse bookmark:
Nome: Procura no IMDb
Location: http://www.imdb.com/find?s=all&q=%s&x=0&y=0
Keyword: imdb
Description: Procura no imdb através do atalho imdb :)



nota: o principal está em substituir a palavra Matrix por %s

3º - Testar a pesquisa
Entrar na barra de endereços do firefox e digitar :
imdb Matrix

Repara que este princípio pode ser aplicado a vários outros sites basta seguir a receita.

obs. Para os mais preguiçosos existe um add-on do firefox que já faz isto - Research word ^_^

quarta-feira, 14 de janeiro de 2009

Portugal 2009 - Crise ?! Qual crise ?

Portugal pode estar em crise, mas nem tudo são más notícias.
Podemos verificar que as novas tecnologias são uma aposta de algumas autarquias, como é o caso de ìlhavo, que em Janeiro adjudicou um contracto com a "ATMINFORMATICA2 - SOLUÇOES E SISTEMAS, SA" por 380.666,00 €. Ora bem e então que foi contratado? Muita coisa.....
3 Computadores, 1 impressora de talões, 9 fones, 2 leitores opticos
o.O
Alguma coisa de muito errado aconteceu aqui!
Com 380.000€ comprava computadores para todos os habitantes registados na autarquia!
Mas este não é caso único, se navegarmos mais pela listagem fornecida pelo governo encontramos coisas tão ou mais extraordinárias!
Vamos a ver se isto aparece no "Nós por cá" :D, já lá abri um pedido....
E assim vai o nosso Portugal dos pequeninos.....

terça-feira, 6 de janeiro de 2009

Traduções - Google , Babelfish @£§]@½6

Isto das traduções tem muito que se lhe diga ...



Quando o tio google deixa de traduzir acontece isto!

Mas mesmo quando funciona, também....



O meu mandarin está um bocado enferrujado, mas o que aquilo queria dizer era qualquer coisa como:
Entrance to Bus here ou mais sucintamente Bus Stop,
do segundo nada dá para extrapolar uma vez o que servidor deu "internal error"

sábado, 3 de janeiro de 2009

Ubuntu - Editor de texto pré-definido

Como alterar algumas das associações por defeito que existem no ubuntu:

~$ man update-alternatives
aqui podemos consultar as várias possibilidades ao nosso dispor.

A razão que me levou a este post foi o facto de já ter literalmente "ido aos arames" com o nano. Não porque é um mau editor de texto, muito pelo contrário, é uma uma excelente opção, mas para quem está habituado a usar vi, o nano é um verdadeiro quebra cabeças.....

Para alterar o editor por defeito do ubuntu:
~$ sudo update-alternatives --config editor

Existem 4 alternativas que fornecem `editor'.

Selecção Alternativa
-----------------------------------------------
1 /usr/bin/vim.tiny
2 /bin/ed
*+ 3 /bin/nano
4 /usr/bin/vim.basic

Pressione enter para manter a omissão[*], ou digite o numero seleccionado: 4
A usar '/usr/bin/vim.basic' para disponibilizar 'editor'.

para ter acesso ao vim.basic é neccessário instalar o vim, já que por defeito no ubuntu vem apenas instalada um versão minimalista do vim (vim.tiny), sem muitas das suas features.

Star Wars - Lego

Para quem não conhece, aqui fica uma adaptação de uma pequena parte do espetáculo de um dos melhores stand up comedians da terra de sua majestade - Eddie Izzard, sobre coisas que não lembram a ninguém mas expremamente plausíveis de acontecer na Lendária Death Star.