Disable Visual Studio Attach to Process Warning

The purpose of this post is to remove the annoying security warning while attach to process. PLEASE ALWAYS ATTACH!!


To remove the warning, all that needed to be done:

  1. Close all windows of Visual Studio 2013!! (the registry value won’t be set if it a window remains opened)
  2. Open regedit (just type it in from Win menu)
  3. Set the following key to 1 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\Debugger\DisableAttachSecurityWarningCapture
  4. Restart computer

Hope this helps! Bye

Remap Resharper shortcut in Visual Studio

The problem for me was when I installed resharper and opened it for the first time, I selected default to Resharper shortcut which I later found that I had to press Ctrl + Shift + N to do the file search instead of traditional Ctrl + T.

Below answer is retrieved from StackOverflow (Not the selected answer, but has most upvotes and works for my case)

  1. Go to Tools -> Options -> Environment -> Keyboard -> Press the (RESET) button
  2. Go to ReSharper – > Options -> Keyboard & Menus -> Select the “Visual Studio” scheme -> Press “Apply Scheme”
  3. Press “Save”
  4. Press “CTRL-T”. Since this shortcut is mapped in both VS and Resharper, you will be presented with the “Shortcut Conflict”-window. Here you select “Use ReSharper (Ultimate) command” and make sure to check the box “Apply to all ReSharper (Ultimate) shortscuts”.



Hide directory tree in Apache server

Take me hours to figure this crap out. Anyways, here’s the short story:


Open apache configuration file:

sudo nano /etc/apache2/apache2.conf


Scroll down to the <Directory /var/www/>. Add Options -Index and comment Option Indexes FollowSymLinks like so:

<Directory /var/www/>
    Options -Indexes
#    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted


That’s all you have to do to hide the directory list. Happy Programming! DX

Server Setup on Instances

Install Apache

sudo apt-get install apache2-mpm-prefork
sudo a2enmod userdir
sudo a2enmod expires

Restart Apache

sudo /etc/init.d/apache2 restart 
sudo service apache2 restart

Install MySQL

sudo apt-get install mysql-server mysql-client

Create DB user in MySQL

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON db_name.* TO 'username'@'localhost';

Install PHP

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
sudo apt-get install libapache2-mod-php5


Linux Commands

Remove directory and all the files/folders in it:
rm -rf <folder_name>

Copy a directory and all its contents:
cp -a /source/. /dest/

Git commands

Stage only modified files and not untracked ones
git add -u

git commit -m 'your_message'

Clear Install Windows under Dual Boot System

I haven’t been using Windows for too long that I really couldn’t retreive the admin password back to the brain. Since I have a dual boot system (Lubuntu & Win7 Ultimate), I thought I had to wipe everything and redo the whole setup again, but fortunately Linux system can actually be preserved. We only need to redo the Windows setup and reset Linux grub.

Reinstall Windows

  1. Insert Windows Installtion disk
  2. Format the partition that is labelled Primary
  3. Install Windows on the Primary partition

After clean installing Windows, grub is gone from the startup and jump straight into Win7 system. To restore the option for choosing OS, we need to get the grub back.

Recover grub (Lubuntu 14.04)

  1. Insert Linux disk / usb and select the option “Try without installing Lubuntu”
  2. Alt + Shift + T to open terminal
  3. Run sudo fdisk -l to display a list of partitions on the hard drive
  4. Run sudo mount /dev/sdaX /mnt where X is the number labeled with Linux
  5. Run sudo grub-install --root-directory=/mnt /dev/sda to install grub
  6. Run sudo update-grub
  7. Reboot

*Note: if you get an error that say “Can’t find /dev/sdaX in /etc/fstab or /etc/mtab” from Step 4, you should double check to make sure that there are no whitespaces missing from the command.