File

Category Archive ‘Cábulas’

Windows Live SkyDrive

19, December, 2008 Antonio Campos 1 comment

Since I had this service never had curiosity or need to use, Today I discovered a problem in that the solution could be found by using Skydrive so I have done some tests.

For those who do not know what is the Skydrive is a space on the Internet that can be used to store or share Archives, not use other systems of the genre so I have no comparisons. Briefly, a disk that is accessed via the Web. Are 25 GB of space we use with our stuff!!

It has lots of features that interested me most was the one to share in simple files with the world!!!

I took to share some files I had on my desktop that can be useful, My SkyDrive Folder! This link requires logging in with a LiveID, to send the code to embed a single file or folder is accessed without any login.

Categories: Cábulas, Microsoft, Windows

Wordpress alterar estado posts

25, November, 2008 Antonio Campos 1 comment

Para solucionar o problema colocado no fórum Wordpress-PT fiz um pequeno comando SQL que permite alterar o estado de todos os posts numa categoria de uma vez só paradraft’, publico este pequeno UPADTE porque com pequenas modificações pode ser bastante útil a quem necessite de actualizar vários posts ou páginas de uma só vez directamente na base de dados do Wordpress.

UPDATE wp_posts p /*Tabela onde estão os posts e páginas*/
LEFT OUTER JOIN wp_term_relationships r ON r.object_id = p.ID /*tabela com as relações dos posts*/
LEFT OUTER JOIN wp_terms t ON t.term_id = r.term_taxonomy_id /*tabela onde estao as descrições das categorias*/
SET p.post_status =draft/*estados possiveis draft, publish ou pending*/
WHERE p.post_status =publishAND p.post_type = ‘post’ AND t.slug =NomeDaCategoria/*condições para proceder ao update*/

Categories: Cábulas, WordPress

Reset Wordpress admin Password

25, November, 2008 Antonio Campos 1 comment

Ia hoje fazer alguns testes numa instalação do wordpress que tenho no meu computador, após várias tentativas não me lembrava da password de admin que configurei para esta instalação. Ainda fui à base de dados mas lá tem apenas um md5 da password.

Lá fiz um ficheiro php que fazecho md5(password)” e colei o valor na base de dados e ficou ok.

Para me facilitar o trabalho em futuros e previsíveis esquecimentos criei um pequeno script em php que faz todo o processo de reset da password de admin, bastando para isso editar o valor da password em plain text que está no topo do ficheiro.

Em baixo disponibilizo a source em php do ficheiro, para usar basta colar este texto num ficheiro .php na pasta da raiz da instalação do wordpress e visitar o mesmo no browser.

<?php
/*Nome do utilizador do qual queremos alterar a password*/
$nome_utilizador = "admin";
/*Nova password para o utlilizador configurado em cima!*/
$nova_password = "teste";
/*
ATENÇÃO: se deixar este ficheiro no servidor sempre que alguém aceder ao mesmo a password

será alterada para esta.
Não é necessário alterar nada daqui para baixo, este script lê as configurações de acesso

à base de dados através do ficheiro de configuração do wordpress
*/
require( dirname(__FILE__) . '/wp-config.php' );
$ligacao = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
if (!
$ligacao) {
die(
'Não foi possível Ligar: <br />' . mysql_error());
}
echo
'Ligação à base de dados bem sucedida!!<br />';
$base_dados = mysql_select_db(DB_NAME, $ligacao);
$nova_password = md5($nova_password);
if (
mysql_query ("update ".$table_prefix."users set user_pass = '".$nova_password."' where user_login = '".$nome_utilizador."'"))
{
echo
"Password alterada com sucesso!!!<br />";
}
else
{
echo
"Ocorreu um erro ao alterar a password!!<br />".mysql_error();
}
echo
"Deve agora apagar este ficheiro do servidor!!<br /><a href=\"http://antoniocampos.no-ip.com\">Antonio Campos</a>";
mysql_close($ligacao);
?>

Categories: Cábulas, WordPress

Logmein Hamachi instant VPN

19, August, 2008 Antonio Campos 1 comment

I explained some time ago as configure VNC to access a remote computer, to facilitate the recording of your remote computer's recommended DNS service no-ip.

Some who follow my recommendations had problems, especially in the configuration of routers. I tried another system for remote access this time requires no configuration on the router just install a program and have an almost instant VPN , this product called Hamachi.

Hamachi has this week a change in license, until now had several versions of the program (one free and two paid unless error), now this distinction has disappeared, is only one version,is free for personal use or non-profit as the paid version is for business uses and or business.

Hamachi allows you to create a kind of private network through the Internet protected by passwords and other mechanisms to protect data transmitted over the Internet. We can give the most diverse material, not vary'll explain how to use Hamachi for remote access through VNC or Remote Desktop or any other program that runs on the TCP-IP…

Installation:

1- Download the hamachi no site do Logmein (Hamachi is available for Windows, Mac and Linux)

The version that was tested in Windows, test story however in Debian.

2 - Installation is the typical Next – Next – Next …. The only option that I highlight in the course of the next Next is the option to disable the use of critical services through Hamachi, understand the critical services for file sharing and other services not listed but that concern is often attacked by virus. For this and if they want to create a network for, say, play network games with friends is recommended to block these services. To do this simply check a box apropiada:

[Click to enlarge]

3 – The table below where we choose the type of license to use, in my case is “Use hamachi with non commercial license”!!! Then just install and wait, and is the functional program.

4- With the program installed or have to create a network or join an existing network.

[Click to enlarge]

Option “Create New Network…” is used to create a network where others can come, by a password that is provided by the creator of the network…

Option “Join an existing Network…” is to partner with an existing network.

After this step in the main program have the status of the network with customers and the status of each.

To use any of the ip assigned by hamachi, just copy the address and point the program to use for the ip you want. This ip is assigned by the hamachi and permits comunição TCP-IP with the remote machine.

One of the advantages of Hamachi is not having to memorize many addresses simply enter the desired network and have a list of available address, one that I believe is a great advantage is not having to configure routers with NAT rules in which each program will require doors and a bit complicated to people who are not familiar with the terminology used in the fabulous world of networks.

Uma das grandes desvantagens que vejo em serviços deste género é depender de uma entidade externa que não me pode garantir uma fiabilidade de 100% no seu sistema. The level of security within the network created by Hamachi I have not had chance to test properly but for now it seemed safe!!!

Site LogMeIn Hamachi.

Categories: Cábulas, Manuals, Utilities

Contact by Live Messenger

24, July, 2008 Antonio Campos 1 comment

I have seen on some sites a clone of Windows Live Messenger, but a version “embebed” never raised a lot of curiosity I thought it was some script available on any site.

Today someone asked me how I could put one of these things in a blog took a look at the example I sent, and behold, here I share the solution that the person who gave me “asked” .

First the code for “embed” the chat window in Live Messenger site is provided by Microsoft PróPia.

To put the actual window just visit this LINK, log in with a Live Passport, then we have to grant permission for the presence in Live Messenger is visible through the Web:

After that click on the link “Create HTML”, carefully select which of 3 presentation of possible options we, can be a window (iframe):

Or a button that opens a chat window in a pop-up or a simple icon, through any one of the ways visitors can know the state we have in the messenger at this time.

For those who use Windows Live Messenger that will be a simple way to make a contact form in real time without having to use the typical chat in java or other methods that the new alert message is not so immediate, I say this because other forms of contact in real time via the internet we have to have a page open in your browser and just detected a new contact when we look at the full page, ie there is no visible warning in other cases still have to do refreshs constant. Another advantage is that we can have conversations without revealing our e-mail.

We consider a disadvantage that we can at any time be “spamados” ridden, without identifying the “aggressor” since this system allows you to send anonymous messages.

Categories: Cábulas, Manuals, Microsoft