Archive

Archive for the ‘General’ Category

Universal SMS Archiver

May 13, 2016 Leave a comment

Users who have been using Android devices will swear by SMS Backup and Restore to backup their SMS, while iOS users have iTunes backup. While these works, one issue with such software is that you generally do not want to keep or transfer all of your old SMS into the new device.

Introducing Universal SMS Archiver!

  • It is a desktop app that runs on Windows, and has the ability to automatically import your SMS from iTunes and SMS Backup and Restore files.
  • You can also manage the entire list of SMS into a current as well as archived list.
  • It has the ability to export your current sms list into Excel for further processing

image

The latest executable can be downloaded at https://onedrive.live.com/redir?resid=895931B65435BB3D!30467&authkey=!AG-VaHLPBh10qLg&ithint=file%2czip

Source code can be found at https://github.com/kwanann/Hobbies/tree/master/Universal%20SMS%20Archiver

Advertisements

Quick and dirty way to generate a self signed cert that lasts 10 years

November 17, 2015 Leave a comment

While I love IIS’s and most program’s ability to generate a self signed cert, my gripe with those is that they last only a year. While a year is generally sufficient for development purposes, sometimes you want one that lasts a whole lot longer.

 

In order to get one that lasts longer, you will need to turn to openssl.

 

Here are the steps

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 3650 -nodes -config ..\share\openssl.cnf

openssl pkcs12 -export -out localhost.pfx -inkey key.pem -in cert.pem

 

Parameters

– newkey: Generate a RSA 2048 bit encryption key

– keyout: the file containing the private key

– out: the file containing the certificate details

– days: how many days is this certificate valid for

– nodes: needed for pfx

– config: for windows, to specific the configuration file location

 

image

Categories: Development, General, IIS, SSL

Enabling HTTPS for Seafile (Windows)

May 7, 2014 71 comments

EDIT: Video tutorial can be found at http://www.youtube.com/watch?v=HRNCpR_mSSs&feature=youtu.be

While there has been documentation on how to enable HTTPS for seafile in *nix environment. There is no documentation for doing this on windows.   Looking at the nginx implementation, it is essentially doing a reverse proxy. This is something that IIS+URL Rewrite can easily achieve!   Before we proceed, take a look and understand the reverse proxy requirements found at https://github.com/haiwen/seafile/wiki/Enable-Https-on-Seafile-web-with-nginx   I will not go into steps on how to generate your own SSL cert, but rather focus on how to use IIS to reverse proxy the necessary ports.   Requirements

  1. Standard implementation of seafile ONLY
    1. ie seafile listens on the following port: 8000, 8082, 10001, 12001
  2. HTTP requests to port 80 will be redirected to HTTPS calls on port 443
  3. HTTPS requests on port 443 will be treated as follows
    1. if it starts with seafhttp, send it to seafile port 8082
    2. otherwise send it to seafile port 8000

Step by Step Guide

  1. Install seafile on the server
  2. Install IIS with default options
  3. Run IIS Manager image
  4. Install Web Platform Installer (WebPI)
  5. Inside WebPI, install URLRewrite
  6. Create 2 websites, pointing to separate physical folders. Ensure the https website is associated with a valid SSL certificate image
  7. Edit the web.config for the HTTP site

    <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <rewrite> <rules> <rule name=”Redirect to HTTPS” stopProcessing=”true”> <match url=”(.*)” /> <action type=”Redirect” url=”https://{HTTP_HOST}/{R:1}” /> </rule> </rules> </rewrite> </system.webServer> </configuration>

  8. Edit the web.config for the HTTPS site

    <configuration> <system.webServer> <rewrite> <rules> <rule name=”seafhttp” stopProcessing=”true”> <match url=”seafhttp/(.*)” /> <action type=”Rewrite” url=”http://127.0.0.1:8082/{R:1}” appendQueryString=”false” logRewrittenUrl=”true” /> </rule> <rule name=”Reverse Proxy” patternSyntax=”ECMAScript” stopProcessing=”true”> <match url=”(.*)” /> <!– Redirect all requests to non-HTTPS site. –> <action type=”Rewrite” url=”http://localhost:8000/{R:1}” logRewrittenUrl=”true” /> </rule> </rules> </rewrite> </system.webServer> </configuration>

  9. Enjoy a secure version of seafile 🙂
Categories: General, Hacking, IIS

Windows 8.x–Disable Hibernation and Sleep

January 17, 2014 Leave a comment

To turn off either one, first start an administrator mode command prompt

and then type the required commands

 

#turn off hibernate
powercfg /H off

#disable sleep
powercfg -change -standby-timeout-ac 0

 

image

Categories: General

data.gov.sg Focus Group

August 14, 2013 Leave a comment

As part of data.gov.sg efforts, the Infocomm Development Authority (IDA) has embarked on a pilot project with the National Library Board (NLB). The pilot project revolves around the use of linked data technology to better manage and share data. We are looking for developers to test our pilot project, and would like to invite you to participate in a focus group session for this.

If you are interested and are familiar with APIs and app development, do read on below for further details and if you are keen to be part of this pilot

1. Background:
The objective of the pilot is to enable better sharing of government data with linked data. (If you are interested in linked data, read more about it here.)

For the pilot project, we have created a mobile app, LinkMe and a web browser app, Pathfinder with government linked data. The types of government data used in the pilot include land and routes data (SLA), traffic data (LTA), weather data (NEA), parks data (NParks), etc. As part of Pathfinder, we have also made available some data for developers to test. These datasets are shared via APIs and SPARQL queries.

As a participant, you will explore the above and provide feedback on your experiences at a focus group session. You will also be entitled to receive incentives amounting to $50.

2. What will be expected of you:

Step one :  Attend a focus group session (at IDA HQ, 10 Pasir Panjang Road on 17th Aug from 9am to 2pm)
Step two : Use or explore the apps/datasets/APIs
Step three : Provide feedback via survey after using the apps/datasets

3.  If you accept our invitation and would like to participate in our focus group sessions:

Please provide the following details and email it to liyana_muhammad_fauzi [at] ida.gov.sg :

Details Required

Please indicate below

Name (as per NRIC):

 

NRIC Number:

 

Age:

 

Gender:

 

Mobile Number:

 

What smartphone device are you using, and what is the version currently
(E.g.: iPhone 4/5, Android phone, Windows phone, etc.)?:

 

If you are using an iPhone 4S or later, please provide your UDID:
Here’s a URL showing how to locate the UDIDs – http://www.innerfence.com/howto/find-iphone-unique-device-identifier-udid.

 

 

IDA seeks your cooperation not to divulge any information or data related to this pilot project.

(Note: All focus group participants are required to sign an undertaking for your participation in this.)

Categories: General

Review of HP Folio 9470m

March 25, 2013 Leave a comment

With the launch of Windows 8, there have been a slew of new ultrabook and lightweight laptops that appeared. However for a Developer or IT Professional, these laptops are typically useless.

 

An ultrabook will typically have

  • a very small form factor – thin (<2cm height) and light (< 2kg)
  • Unconfigurable, and parts such as hard disks and ram are not easily replaceable
  • Quite low specifications – 4GB ram, 128GB SSD
  • Non standard ports, typically require external adapters to plug into LAN or VGA projection
  • Long battery life

On the other hand, a laptop can be the complete opposite of an ultrabook i.e

  • decent form factor, weight varies anywhere from 1.2 to 3kg or more
  • Highly configurable
  • Specifications can be customized, though typically the higher the specification the higher the cost as well as the weight
  • Standard ports for VGA and LAN is usually present, typically a lot more ports compared to an ultrabook
  • Decent battery life

I’ve been searching for quite a while for a high specifications laptop which has a small form factor and is light as well as having a backlit keyboard. Yes it sounds very much like a macbook pro and that is actually the kind of hardware that I was trying to replicate with hardware from windows OEM partners.

 

Finally in late 2012, I finally found it, the HP Folio 9470m!

 

The specifications found at HP site is inline with what I was looking for, and the best part is that it comes with an external battery to bring it up to 21 hours of usage, a built in 3G/4G modem and a fantastic warranty plan!

 

http://h10010.www1.hp.com/wwpc/us/en/sm/WF05a/321957-321957-64295-5228908-5228906-5271146.html?dnr=1

 

Category Specifications Comments
CPU Intel I5 to I7 Standard low voltage Ivy Bridge Intel CPU
Ram Up to 16GB 16GB of ram, definitely able to run almost all my development and VM workloads, user replaceable too!
Hard Disk 7200RPM 320GB to 500GBSSD 128GB to 240GB

MSATA 256GB

Self encrypting drive options available

Decent hard disk options. However what I like is that its user replaceable, as long as it fits the SATA port and has 7mm heightThere are 2 ports actually, a SATA and a mSATA port, so you can in essence have a 256GB mSATA SSD and a 1TB SATA 7200 RPM HDD. No need to worry about replacing a DVD drive just to get another slot for storage
Screen Size 14” LCD (1366×768)14” HD (1600×900) option available This seems to be a sweet spot, any smaller it becomes harder to do any form of decent development, any bigger makes it hard to carry around
Graphics Built-in Intel Graphics This is a laptop, games have long ago been delegated to my tablet
Ports/ Expansions 2xUSB 3.0
1xUSB 3.0 charging
1x Display Port 1.1a
1xVGA
1xRJ45
1xcombo headphone/mic jackWebcam
I like the fact that USB 2 has been totally phased out and its using all USB 3 ports.
Update: The charging port is able to charge an IPAD too!Also the presence of full VGA and RJ45 ports are definitely a plus. No need to carry extra wires for those and increase my risk of losing them
Keyboard Spill resistant backlit keyboard with 2 settings Definitely a plus, especially when working in dim areas. 2 settings works well too, sometimes I just need a bit of light
Pointing device Glass touchpad
Point stick
Dual pointing options for those that can’t figure what they want to use
Communications 10/100/1000 NICMultiple WIFI options from Intel, Atheros, Broadcom

3G/4G mobile broadband

The built in 3G/4G mobile broadband option is definitely a very big plus, no need to carry a dongle anymore!Update: for Singapore, only the 3G mode is available and its in a full sized sim form factor
Battery Replaceable battery (10 hours)External battery (21 hours) Internal battery sounds great, but having the option of external battery and a 21 hours runtime, definitely allows me to get thru any single day without chargingDo note that as you increase the specs of the machine, battery life will drop accordingly
Security Drive Encryption
Pre Boot Security
Face Recognition
Smart Card Reader
Fingerprint sensor
TPM
Whole bunch of security features for the security conscious
Warranty 1-> 3 years standard warrantyOptions
– Travel
– Accident
The options are really great, take a look at the Accidental Damage Protection plan
Dimensions 13.3 x 9.09 x 0.75 in (33.8 x 23.1 x 1.89 cm) Decent dimensions, although not as thin as ultrabook, for the available ports, it’s a good compromise
Weight Starting at 1.61kg Again not ultrabook spec, but light enough

 

From the specifications,  i would highly recommend this machine for anyone looking for a workhorse and yet is really mobile enough with decent battery life (kind of what everyone is aiming for)

Rating: 4.5/5

 

I bought one of these from HP in December 2012, stay tuned for my hands on review of the unit!

Categories: General Tags:

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