The Net Age

Tuesday, July 03, 2012

[Disclaimer: Worked at the time. Make backups of files you change and I can not be held responsible for any damage you do! All Copyrights remain with their rightful owners.]

If you have a Razer Gaming Mouse and have installed Razer Synapse 2.0 on your Mac OS X you will notice a very annoying icon on the top of the menu bar. Dont get me wrong this is a lovely icon. Unfortunately it sticks out like a sore thumb compared to the other icons and therefore very annoying. I have modified the icon to have a more subtle one. The offending icon can be found in /Library/Application Support/Razer/RzUpdater.app/Contents/Resources/ and it is named Status.png (notice capital S). So change this and you are sorted. I used Image Tricks Lite and applied a 'Mask to Alpha' and was happy with the result.
(Update: Altered image linked bellow. I removed the border and added a softer grey to it.)

Finally kill the RzUpdater process and it should refresh.

Download Status.png

Labels:

Thursday, August 12, 2010

Receive, store and read SMS messages on Jailbroken iPad

I have managed to find the secret combination of AT commands [1] that will allow you to save an incoming message to the SIM card and then you can read it on the iPad.

You will need the following commands in order to receive SMS to the SIM card.

at
at+cmgf=1
at+cnmi=0,1,0,0,0
at+cpms="SM","SM","SM"
at+cmgl="ALL"

You can make use of the sendmodem [2] code to make life easier. You can use minicom too!

Example:
./sendmodem at
./sendmodem at+cmgf=1
./sendmodem at+cnmi=0,1,0,0,0
./sendmodem at+cpms=\"SM\",\"SM\",\"SM\"
./sendmodem at+cmgl=\"ALL\"

Known problems:
There is an awful time out issue. To start this process you will need to './sendmodem at' until you get OK and then quickly send the rest of the commands.


Enjoy!

Refs:

[1] - GSM AT Commands example (good ref really) - http://www.arcelect.com/GSM%20Developer%20Guide%20-%20GSM%20AT%20Commands%20-%20Rev%20%20A.pdf

[2] - sendmodem - http://code.google.com/p/iphone-elite/wiki/sendmodem

Friday, July 03, 2009

my Tzatziki (ingredients: UK version)

4 people
Total (Fage) 250g (half of the 500g) or thick greek style yogurt - Tesco and Makro stocks it
half a cucumber
3 spoonfuls of Olive oil (add a bit more if you wish, taste)
2 spoonfuls of red vinegar (optional, adds a different taste)
a pinch or two of salt (to taste)
a pinch of black pepper
2 cloves of garlic (add more to make stronger, or less to make weaker)

8 people
Total (Fage) 500g or thick greek style yogurt - Tesco and Makro stocks it
5 spoonfuls of Olive oil (add a bit more if you wish, taste)
3 spoonfuls of red vinegar (optional, adds a different taste)
a whole cucumber
a pinch or two or or three or four of salt (to taste)
a pinch of black pepper
4 cloves of garlic (add more to make stronger, or less to make weaker)

Instructions:

Wash the out side of cucumber and grate it on the thick option of the grater with the skin (if you like you can remove the skin, up to you).
Place in a drainer (paste drainer, with small holes) spread it out and add some salt to help remove the water from the cucumber. Leave it for 10 to 15 min to drain. Then given it a mix and squeeze out any remaining water (ironic as cucumber is mainly water).
In a bowl add the grated cucumber and Total yogurt, Olive oil, red vinegar (optional), on the small side of the grater grate the garlic in and mix it all. Take care of the olive oil when mixing it in with the yogurt. Finally add pinch of salt and pepper to taste.

Try some with a small spoon and adjust ingredients accordingly.

Eat with pita bread, normal bread,
or as a side to red meat, steaks, skewered meat, pork, chips (french fries), BBQ meat.

Enjoy!

Labels: , , , ,

Sunday, June 22, 2008

PayPal Express Encrypted Button - simple!

Welcome to PayPal Express Encrypted Button made easy post!

Ok, you want to make a simple encrypted PayPal Button!

This is not easy as there is poor php support by PayPal. Sure there is Stellar Web Solutions Encrypted Button and a bit of information on PayPal's site on Encrypted Buttons which includes either a static button creation or the use of Encrypted Website Payments (EWP) for very advanced users(users of C#, Java and .NET).

Here I will provide a full PHP working example that does not require OpenSSL (e.g,Stellar Web Solution) as a third party package. I have used the code from the Encrypted Website Payments plugin module by Harald Ponce de Leon for OSCommerce.com:

Things you need before hand:

1.Open a Paypal Sandbox account at the Developers Site https://developer.paypal.com/
2.Create Test Certificates (Buy when required!) Info: https://www.paypal.com/IntegrationCenter/ic_button-encryption.html
3.After you upload your Cert and get your Cert ID add it to your PHP page and anything else that is required.
4.Finally make sure your PHP server supports OpenSSL and the OpenSSL functions (e.g., openssl_pkcs7_encrypt())

5.Yes, that is it ! I hope ...good luck!

Download link to PHP file(remove .txt extension) or the partial code bellow (the HTML is missing):

--------------PHP CUT FROM HERE-------------------------------

/*
$Id: payme.php 1000 2008-05-19 18:16:37Z hpdl $
Some code taken from osCommerce, Open Source
E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2008 osCommerce

and
Harald Ponce de Leon

and
Sample PayPal Button Encryption: Copyright 2006,2007 StellarWebSolutions.com
Not for resale - license agreement at
http://www.stellarwebsolutions.com/en/eula.php

Copyright (c) 2008 s1m0n3.org


Released under the GNU General Public License
*/

// private key file to use
$MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY = "prvkey.pem";

// public certificate file to use
$MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY = "pubcert.pem";

// Paypal's public certificate
$MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY = "paypal_cert.pem";

// Your Paypal business email
$MODULE_PAYMENT_PAYPAL_STANDARD_ID='yourPayPalBussEmail@hotmail.com';

// CERT ID FROM PAYPAL. Check Step 2. Uploading Your Public Certificate at
// https://www.paypal.com/IntegrationCenter/ic_button-encryption.html
$MODULE_PAYMENT_PAYPAL_STANDARD_EWP_CERT_ID = 'ZZ1Z1ZZ11ZZZ1ZZZ';

// a temporary folder required to create the encrypted files (check server permissions).
$MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY='tmp';

// edit the array bellow as required. When done move to the HTML area at the bottom.
$form = array('cmd' => '_xclick',
'business' => $MODULE_PAYMENT_PAYPAL_STANDARD_ID,
'cert_id' => $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_CERT_ID,
'lc' => 'GB',
'custom' => 'test',
'invoice' => '',
'currency_code' => 'GBP',
'no_shipping' => '1',
'item_name' => 'Cool USB Mouse',
'item_number' => '1',
'amount' => '10'
);

$encrypted = paypal_encrypt($form);

function paypal_encrypt($hash)
{
global $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY;
global $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY;
global $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY;
global $MODULE_PAYMENT_PAYPAL_STANDARD_ID;
global $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY;
global $OPENSSL;

if (!file_exists($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY)) {
echo "ERROR: MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY not found\n";
}
if (!file_exists($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY)) {
echo "ERROR: MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY not found\n";
}
if (!file_exists($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY)) {
echo "ERROR: MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY not found\n";
}

$customer_id = 'paypal';
$random_string = rand(100000, 999999) . '-' . $customer_id . '-';


$data = '';
reset($hash);
while (list($key, $value) = each($hash)) {
$data .= $key . '=' . $value . "\n";
}
// echo $data;

$fp = fopen($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', 'w');
fwrite($fp, $data);
fclose($fp);

unset($data);


if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt')) {
openssl_pkcs7_sign($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt', $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', file_get_contents($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PUBLIC_KEY), file_get_contents($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PRIVATE_KEY), array('From' => $MODULE_PAYMENT_PAYPAL_STANDARD_ID), PKCS7_BINARY);

unlink($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'data.txt');

// remove headers from the signature
$signed = file_get_contents($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt');
$signed = explode("\n\n", $signed);
$signed = base64_decode($signed[1]);

$fp = fopen($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', 'w');
fwrite($fp, $signed);
fclose($fp);

unset($signed);

openssl_pkcs7_encrypt($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt', $MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt', file_get_contents($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_PAYPAL_KEY), array('From' => $MODULE_PAYMENT_PAYPAL_STANDARD_ID), PKCS7_BINARY);

unlink($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'signed.txt');

// remove headers from the encrypted result
$data = file_get_contents($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt');
$data = explode("\n\n", $data);
$data = '-----BEGIN PKCS7-----' . "\n" . $data[1] . "\n" . '-----END PKCS7-----';

unlink($MODULE_PAYMENT_PAYPAL_STANDARD_EWP_WORKING_DIRECTORY . '/' . $random_string . 'encrypted.txt');

return $data;
}
return "ERROR";
};

// Edit HTML below here!
?>

THE HTML HAS BEEN REMOVED GET THE TEXT FILE !!
--------------PHP CUT UNTIL HERE-------------------------------

Monday, June 16, 2008

ADSL Modem and Netgear Wireless router - comm. problems

Let me explain in short the topology and then problem.

I have a ADSL2+ USRobotics 9112 Modem Ethernet/USB Router. It is connected, through ethernet to WAN, to a Netgear 54Mbps Wireless Router.

The problem: Every time there was a bit more traffic than normal, at unsuspected time the Internet was unreachable(as if it were disconnected). Further testing is required for me to go into details on what lights were turning to yellow and flashing... anyway... the many affect was the same.. no Internet until it reset its' self or you powered on and off the modem.

The solution: The solution that worked for me at least, was to lower the MTU Size. By default this is set to 1500. When I set it to 1492 the Netgear router would not talk with the ADSL modem and the link had a yellow led. When I lowered it again to 1450 'for PPTP connections' (as mentioned by Netgear help) everything worked again.

After a while with this setting (MTU Size at 1450), I can say that it has corrected the problem there have not been any problems with the Internet disconnecting or not operating for an known reasons.

Good luck!

Tuesday, June 12, 2007

Computer Browser (Network Browsing not working)

After uninstalling Norton Internet Security 2006 from my machine, I was unable to view my Shared drives on my Local Network (Network Browsing was not working).

After looking and comparing the running Services I found that Computer Browser was missing. I tried a few solutions I found on the Internet. One person did recommend that Client for Microsoft Networks was missing.

So what I did was uninstalled Client for Microsoft Networks and File and Printer Sharing for Microsoft Networks and re-installed them again after the reboot. This can be found from Local Area Connection -> Properties -> (Install-Client,Service)

You can guess, it worked!! Now why this happened after the removal of Norton I have no idea.

Labels: , , , , , , , ,

Thursday, December 14, 2006

Blocking MSN ads

UPDATE(20/06/2007) :

It is just easier to block rad.msn.com
The problem you might face is that this domain has several ip addresses associated with it.

Here is the list I came up with (list correct till 20/06/2007) :

65.54.195.185
65.54.194.118

207.68.178.12
207.68.178.16
207.68.178.56
207.68.178.61
207.68.178.134
207.68.178.153 - UPDATE (20/06/2007)
207.68.178.239
________________________________________________________

In order to block MSN ads block the following IP ranges (probably just for MSN, if you can specify it on your firewall):

EuroClick1:
193.149.47.32 - 193.149.47.62
or
193.149.47.32 / 255.255.255.224

EuroClick2:
193.149.47.128 - 193.149.47.255
or
193.149.47.128 / 255.255.255.128

Akamai Technologies:
84.53.134.1 - 84.53.137.255
or
84.53.134.0 / 255.255.252.0

Beware: there is a possibility that if you block these IPs in general some links and services will no work. Especially if they make use of AKAMAI

Labels: , , , , , , ,

Wednesday, September 21, 2005

Mac OS X and linux progs. with fink

If you have Mac OS X then you should also get FINK if you are into running open source programs on your Mac. Dont forget to test XDarwin (http://www.xdarwin.org/)

get FINK at:
http://fink.sourceforge.net/


A great explanation can be found here:
http://www.nbcs.rutgers.edu/newdocs/mac004/mac004.php3

Althought some changes have occured. Rootless is part of the new version of xfree86 so you just have to select it(xfree86) from the Finkcommander and it installs XDarwin.

Next move will be to find KDE - base system.

Dont forget add this:

. /sw/bin/init.sh
/sw/bin/startkde >/tmp/kde.log 2>&1

to the file .xinitrc in your home directory.

Tuesday, August 16, 2005

Windows Share in Apple Mac OS X

Loading a Windows Share in Mac OS X. No it is not so hard as you would think. It took a while to find but in the end it works great.

mount_smbfs -W workgroup '//username@machineIpOrName/shareName' directoryToLoadIn

the operating system will create a link in the desktop and on the side of Finder. Eject as usual. directoryToLoadIn is not really used since a link is created although the folder must exist(yes, empty).

Monday, August 15, 2005

Apple Mac and processes

I have killed and disabled these process that were eating my memory. They do not seam to impair any required functionality of the programs they are linked to.

Note: commence at your own risk. We take no responsibility what so ever.

Disable the iCalAlarmScheduler Process:

Open iCal
goto iCal->Preferences
and untick "Turn off alarms when iCal is not open"
that is it, the process will terminate on its own.

Disable iTunesHelper Process:

Open a terminal and do the following:

$ps -xww
$kill -9 TheProcessNumberForiTunesHelper
$cd "/Applications/iTunes.app/Contents/Resources/iTunesHelper.app/Contents/MacOS/"
$sudo chmod -wrx iTunesHelper


Disable Lexmark X73 process:

If you have a Lexmark X73 printer then the monitor uses the CPU and memory for no apparent reason.

Disable Lexmark X73 Monitor:

$ps -xww
$kill -9 TheProcessNumberForLexmarkX73Monitor
$cd "/Applications/Lexmark X73/X73 Scan & Copy.app/Contents/Monitor/"
$chmod -wrx "Lexmark X73 Monitor"



To return any of the disabled programs back to normal do a
$sudo chmod 775 TheFileName

Warning: You have been warned about messing with your Apple Mac.