Archive

Archive for the ‘General’ Category

Eject and Close CD Tray command line utilities

November 2, 2011 Leave a comment

Been searching around the internet for a decent command line utility to eject or close the CD tray but can’t seem to find any. So i decided to write my own command line versions using visual studio 2010 and .net 4.

Note that the actual code does not utilize any of .net 4 features so you can easily take the same code and compile it against .net 1 or .net 2

The project is currently hosted in codeplex and can be found at http://ejectclosecdtray.codeplex.com/

Categories: General, Visual Studio

Backing up an iOS device (IPhone, iPAD)

April 25, 2011 1 comment

For those interested to backup the ENTIRE file system for an iOS device, here’s how to do it.

Requirements

  1. Jailbroken phone
  2. OpenSSH installed (via cydia)
  3. DD utility on your pc (linux native)
  4. ssh client on your pc (linux native)
Steps
  1. Make sure you can ping your iphone (Settings -> General -> About to get your phone’s IP Address)
  2. Make sure you can ssh to your iphone (from your pc, type ssh root@[iphone ip])
    If you get a prompt asking you to save some key its alright, just type yes
  3. from your PC, run the following command

    ssh root@[iphone ip] dd if=/dev/rdisk0s1 bs=1M | dd of=ios-root.img
    ssh root@[iphone ip] dd if=/dev/rdisk0s2s1 bs=1M | dd of=ios-user.imgssh root@[iphone ip] – ssh client on pc connects to ssh server on iphone
    dd if=/dev/rdisk0 bs=1M – execute dd command with input file =/dev/rdisk0 and block size of 1M
    | – pipe to redirect input to the next command
    dd of=ios.img – run dd on the pc with output file=ios.img

this command will take a while depending on your iphone and wifi speed

Categories: General

Converting a PFX file to PEM and Key via openssl

December 9, 2010 1 comment

For some wierd reason, although the steps are simple, i cannot easily find a single page which gives you the exact steps (only 4) to convert a pfx file to a PEM and a KEY file

below are the steps to convert, it will generate an aa_s.key and a aa.pem which you can then use to put into your system e.g apache, hmailserver etc

REM Set the path to include the openssl directory

set path=%path%;C:\OpenSSL\bin;

REM Export the private key
openssl pkcs12 -in aa.pfx -out aa.key -nocerts -nodes

REM take out the encryption from the private key
openssl rsa -in aa.key -out aa_s.key

REM export the ssl cert (normal cases)
openssl pkcs12 -in aa.pfx -out aa.pem -nokeys -clcerts

REM export the ssl cert (Crescendo load balancers)

openssl pkcs12 -in a.apfx -out aa_tmp_cn.pem -nodes
openssl x509 -in aa_tmp_cn.pem -out aa_cn.pem -text

REM Verification: run the following 2 commands, the output should be exactly the same
openssl x509 -noout -modulus -in aa.pem | openssl md5
openssl x509 -noout -modulus -in aa_cn.pem | openssl md5
openssl rsa -noout -modulus -in aa_s.key  | openssl md5

Done!

Categories: General

Get a hotmail.sg email!

February 25, 2010 Leave a comment

Click here to get a hotmail.sg email address, something new other than the usual hotmail.com, finally you can get a chance to have an email address with a better name than what you had to bear with using hotmail.com!

Categories: General

Removing U3 Partition from Sandisk Drives

September 26, 2009 Leave a comment

Here’s the steps on how to remove the U3 Partition completely from Sandisk Drives

  1. Launch U3
  2. Click on the U3 Icon
  3. Click U3 Launchpad Settings
  4. Click Uninstall

Done :)

Categories: General

HttpRunTime Cache vs Enterprise Library Cache

March 28, 2009 1 comment

This post aims to highlight the differences between the cache implementation of HttpRunTime and EnterpriseLibrary

HttpRuntime.Cache Enterprise Library Caching Block
Standard Actions
Add Item to Cache
Read Item from Cache
Update Item to Cache (using insert) (using add)
Delete Item from Cache
Flush all Items in Cache
Enumeration Actions
Enumerate all items in cache
Employ LINQ Expressions
Cache Dependencies
Cache Dependency – File
Cache Dependency – Other Cache Item (write your own extension)
Expirations
Expiration – Absolute Time
Expiration  – Sliding Time
Expiration – Extended Formats

* Extended time format

“<Minute> <Hour> <Day of month> <Month> <Day of week>”

* means run every period

Examples

o “* * * * *” expires every minute

o “5 * * * *” expire 5th minute of every hour

o “* 21 * * *” expire every minute of the 21st hour of every day

o “31 15 * * *” expire 3:31 PM every day

o “7 4 * * 6″ expire Saturday 4:07 AM

o “15 21 4 7 *” expire 9:15 PM on 4 July

Others
Item priority
Run function when item is removed
Get number of items in cache
Limit number of items in cache
Can use persistent Storage
Run function to refresh item when expires
Categories: ASP.NET, General, Uncategorized

Nexus goes Open Source

January 12, 2009 Leave a comment

After much ado, the source code for Nexus is finally available at http://www.codeplex.com/nexus

Do note that this is a direct port from the current source code used in NUS but without NUS specific widgets and settings.

Categories: General
Follow

Get every new post delivered to your Inbox.