Sunday, July 12, 2015

Create symbolic link in Windows

Linux users may have familiar with ln command, in Linux ln command is used to create a symbolic link.

Here is the example of ln command usage:

ln -s my-original-file my-symbolic-link

For more information about ln command, you can read in here: http://linux.die.net/man/1/ln or just type man ln  in your Linux console.

How about windows users? Don't worry, Windows also has command that can be used for similar purpose like ln command in Linux, the command name is MKLINK. Here is the usage of MKLINK command:

mklink /H my-symbolic-link my-original-file

For more information about MKLINK command, please open the following link: https://technet.microsoft.com/en-us/library/cc753194.aspx


Monday, May 12, 2014

Download Pluralsight video content using Fiddler


Hi everyone, after years no blogging, no sharing to others people through internet, today I decide to start share any little things I know through my this ordinary blog. In this section I will try to share my experience about downloading pluralsight videos. I did it because I need to watch  offline those courses. I don't know is this activity is legal or not.

Prerequisite:
In order to able following this tutorial you need these things.
  • Visual Studio (any version)
  • Download and Install Fiddler 2 (Version: 2.4.7.1 or any other version I think will works)
  • Active pluralsight subscription account.
Okay, after you ready with all above prerequisite items, lets begin. However before we write any codes, I will tell you about my understanding to what we will working on. Actually we will create an add-ons for Fiddler. Yes, we will create a super simple fiddler add-ons to download pluralsight videos content so we can watch those videos offline. If you curious about list of fiddler add-ons that now available, you can check it to here http://www.telerik.com/fiddler/add-ons. Okay lets start to write the codes:
  1. Create class library project in Visual Studio and targeted to .Net Framework 3.5
  2. Add project reference to Fiddler.exe, you can found fiddler.exe under directory that you choose when you installing fiddler, by default its located under C:\Program Files (x86)\Fiddler2\ directory.
  3. In your Visual Studio, more specific in  Solution Explorer, you will see Class1.cs, this file is automatically created by Visual Studio for you :). You can rename it to anything you want or you can delete it then create new one. In my case, I just rename the class name from Class1 to VideoDownloader.
  4. The important thing to remember when we create a Fiddler add-ons is that we must implement existing interfaces that Fiddler already provide. The interfaces that we must implement is IAutoTamper and IFiddlerExtension. For more familiar to any method that must be implement, you can try to debug by attach to process  and see what data that passed in to every methods. For example in the following screenshot I show you what value that passed to AutoTamperRequestBefore method. Actually you can make a complete this pluralsight videos downloader by only implement AutoTamperRequestBefore method. Put your download logic here, or you can create separate class and call download logic from there.
  5. Another thing we need to do is edit AssemblyInfo.cs file and add information about fiddler like the following screenshot.
  6. So far, we have finish create our super simple but awesome fiddler add-ons. Now you must compile the project and then put the .dll file from compilation to Fiddler Extension directory (C:\Program Files (x86)\Fiddler2\Scripts).
  7. Now you can test it by run fiddler and open browser. Here is my codes, if you want to see my logic for download pluralsight videos. There are so many hardcoded path and string, you need to modify to make it working on your local machine.

Sunday, January 29, 2012

Menambahkan routing network pada Sistem Operasi Windows

Kadang-kadang kita harus terhubung ke dua jaringan komputer yang berbeda, misalnya saat kita kerja disebuah client kita akan dihadapkan pada peraturan yang berlaku dijaringan komputer kantor client kita itu. Tidak sedikit client yang melakukan blocking terhadap beberapa situ yang sebenarnya contentnya dapat membantu kerja kita saat berada di kantor client. Kita gak mungkin donk melakukan request ke Admin jaringan untuk membuka, solusi lain adalah dengan menggunakan modem probadi untuk mengakses internet dan tetap terhubung ke jaringan komputer di kantor client. Namun sayangnya jika kita terhubung ke internet menggunakan modem, defaultnya kita gak akan bisa mengakses jaringan lokal komputer client, meskipun secara fisik kita sudah terhubung. Untuk bisa mengakses kedua jaringan tersebut maka kita perlu menambahkan yang namanya routing, caranya adalah sebagai berikut:

  1. Jalankan Command Prompt dengan akses Administrator

  2. Berikut adalah contoh commandyang harus And ketikan
    route add 10.224.162.0 mask 255.255.255.0 10.224.164.18

    Penjelasan:
    route add : merupakan perintah untuk menamkahkan aturan routing

    10.224.162.0 : Alamat Network tujuan yang ingin kita akses (Destination)

    255.255.255.0 = Subnetmask yang digunakan
    10.224.164.18 = Gateway, pintu gerbang yang bisa digunakan untuk mengakses IP tujuan yang akan kita akses. Bisa juga IP dari interface network dikomputer kita selain modem (intrface network yang digunakan untuk melakukan koneksi ke jaringan lokal komputer di kantor client).

  3. DONE

Tuesday, January 17, 2012

New wordpress syntax highlighter plugin which I used

Syntax highlighter is something crucial for programmer who have hobby to write and share everything they know in their personal website or blog. For long time I use wp-syntax as syntax highlighter wordpress plugin. It's really easy to use and useful. Today I try to search another syntax highlighter wordpress plugin, and I decide to use Syntax-highlighter++ which developed by leo108.

These is preview of some helloworld in some programming languages that I write in Syntax-highlighter++

  1. C#
    public static void Main()
    {
               Console.WriteLine("Hello World");
    }
  2. Java
  3. PHP
  4. JavaScript
  5. C

Telerik DatePicker doesn't work with JQuery UI?

As you may know that telerik MVC extension is offering free and great feature for ASP.Net MVC developer. But today I get problem when I use Telerik DatePicker with JQuery UI. The detail of problem I found is Telerik DatePicker unable to return date value I choose. After trying replace existing JQuery 1.4 with JQuery 1.6 the problem is gone.

Using JQuery UI with Telerik together

I just know that the default configuration of telerik is blocked all JavaScript library. If you want to use another javascript library with telerik, call this method from Application_Start() method in Global.asax
ScriptRegistrar.FrameworkScriptFileNames.Clear();

Your full Application_Start in Global.asax maybe looks like this:
protected void Application_Start()
{
      AreaRegistration.RegisterAllAreas();
      RegisterRoutes(RouteTable.Routes);
      ScriptRegistrar.FrameworkScriptFileNames.Clear();
}

Saturday, October 22, 2011

Get idVendor of usb devices in Linux

Sometimes we need idVendor in order to create rules of connected devices using usb port in Linux. The command bellow show you how to get the idVendor information value.
root@digital-home:~# lsusb
Bus 002 Device 004: ID 090c:37b0 Feiya Technology Corp.
Bus 002 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 413c:b007 Dell Computer Corp.
Bus 001 Device 004: ID 0bda:0158 Realtek Semiconductor Corp. USB 2.0 multicard reader
Bus 001 Device 003: ID 0a5c:21b4 Broadcom Corp.
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The list aboce show us information that 413c is usb idVendor from Dell Computer Corp. which currently connected to my computer.