Tuesday, December 22, 2015

How to install Dig on a Windows 10, 8.1, 8, 7 64-bit system

This installation procedure will extract only  relevant libraries and executables from the BIND 9 package, and not install a full-blown DNS server.

Head over to http://www.isc.org/downloads/ and download the BIND 9.10.0-P2 package. Select the 64-bit version and leave the 32-bit package as a last resort. The 64-bit version is dependent on the Microsoft Visual C++ Redistributable package, which you can download and install from http://www.microsoft.com/en-us/download/details.aspx?id=30679#

Why is it preferable to go with the 64-bit version of BIND 9 on a Windows 64-bit system, when 32-bit applications work just fine? Since dig is a command line tool there are a few things to take into account. On a Windows 64-bit system, the command line interpreter (cmd.exe) will be running in 64-bit mode. That means it will look for executables under %SystemRoot%\System32\.
The System32 folder, despite its name is designed for 64-bit executables on Windows 64-bit systems.
/**Note: On Windows 32-bit systems, the %SystemRoot%\System32\ folder is indeed for 32-bit executables.*/





The command prompt with its 64 and 32-bit executables.
The correct folder for 32-bit executables on Windows 64-bit systems is %SystemRoot%\SysWOW64\, again ignore the clever naming scheme as WOW64 stands for “Windows (32-bit) on Windows 64-bit”. Anyhow, if you opted to install the 32-bit version of BIND 9 and thus extracted the executables and libraries to %SystemRoot%\SysWOW64, you’ll need to run the 32-bit version of cmd.exe by issuing the command:

%SystemRoot%\SYSWOW64\cmd.exe


The next step is assuming that the package of choice was the 64-bit version of BIND 9, and that the Microsoft Visual C++ Redistributable is already installed. If not, then make adjustments accordingly. Open the BIND9.10.0-P2.x64.zip file and extract the following files to %SystemRoot%\System32\
/**Note: Moving files into the System32 folder requires administrative privileges (run as administrator).*/

dig.exe
host.exe
libbind9.dll
libdns.dll
libeay32.dll
libisc.dll
libisccfg.dll
liblwres.dll
libxml2.dll

Finally, fire up the command prompt and check if the installation was successful by doing a DNS query:

dig isc.org




Dig on Windows 8.1 64-bit

Thursday, November 19, 2015

How to take a screenshot on your Windows 10 Surface device

Here’s our quick-and-easy guide to recording screenshots on your Surface or Surface Book.

Whether it’s sharing a screen from a game, recording an image of your desktop, or snapping a photo of a Skype session, there are many reasons to take screenshots on your Surface. Surprisingly, there are just as many ways to take a screenshot, depending on which Windows 10 Surface device you have.
Surface 3 and Surface Pro 3
Method 1: The fastest way to take a screenshot on your Surface 3 device is to hold down the Windows logo on the front of the device and then push the volume-down button. The screen will dim briefly as the screen is recorded and saved to the Screenshots folder of your Pictures library under “This PC.”
Method 2: If your typecover has a PrtScn key, you can also take a screenshot by holding down the Windows key on your keyboard and pressing PrtScn. The screen will be saved to the Screenshots folder described in Method 1.
Method 3: You can also just press the PrtScn by itself. But instead of saving your screenshot to the Screenshots folder of your Pictures library on “This PC,” it will be saved in the Screenshots folder of your Pictures library on OneDrive.
Screenshot of taking a screenshot on Surface
Method 4: To take a screenshot of just the active window on your screen, hold down the Alt key and press PrtScn. The screen will be saved to OneDrive as described in Method 3.
Method 5: Double-click the top button of your Surface Pen to take a screenshot of your desktop. The full screenshot will be saved in your Screenshots folder on OneDrive, but this method also gives you the option to crop your image immediately.
A greyed-out version of the image will show up on your screen; use your Surface Pen to drag the tip of the pen from one corner of the portion you want to capture to the opposite corner. When you lift the pen tip, your selection appears in a new page in OneNote.
Method 6: There’s a built-in screenshot program in Windows called Snipping Tool that offers more functionality than the above methods. To open, type “Snipping Tool” into Cortana or search the Windows Accessories folder under All Apps.
From within, you can take screenshots of the full desktop, an active window, or just the part you select. You can then save your screen to a place of your choosing as a PNG, GIF, JPEG, or HTML file.
Screenshot of Snipping Tool
Surface Pro 4 and Surface Book 
All of the above methods work for the Surface Pro 4 or Surface Book—but there’s a slight change to Method 1. Since the Windows logo doesn’t appear on the display of these devices, hold the power button down and then press the volume-down button to take a screenshot. The screenshot will be saved in the Screenshots folder under “This PC.”
By the way, this method can be used on your Surface Book whether the keyboard is attached or detached.

Friday, April 17, 2015

50 States Road Trip

With the help of a sophisticated algorithm, this road trip allows you to start in any state. Just hop on at the point that runs through your state and keep going until you’re back at your starting point!




Here is the list of the landmarks you’d stop at in each state on this road trip:
1. Grand Canyon, AZ
2. Bryce Canyon National Park, UT
3. Craters of the Moon National Monument, ID
4. Yellowstone National Park, WY
5. Pikes Peak, CO
6. Carlsbad Caverns National Park, NM
7. The Alamo, TX
8. The Platt Historic District, OK
9. Toltec Mounds, AR
10. Elvis Presley’s Graceland, TN
11. Vicksburg National Military Park, MS
12. French Quarter, New Orleans, LA
13. USS Alabama, AL
14. Cape Canaveral Air Force Station, FL
15. Okefenokee Swamp Park, GA
16. Fort Sumter National Monument, SC
17. Lost World Caverns, WV
18. Wright Brothers National Memorial Visitor Center, NC
19. Mount Vernon, VA
20. White House, Washington, DC
21. Colonial Annapolis Historic District, MD
22. New Castle Historic District, Delaware
23. Cape May Historic District, NJ
24. Liberty Bell, PA
25. Statue of Liberty, NY
26. The Mark Twain House & Museum, CT
27. The Breakers, RI
28. USS Constitution, MA
29. Acadia National Park, ME
30. Mount Washington Hotel, NH
31. Shelburne Farms, VT
32. Fox Theater, Detroit, MI
33. Spring Grove Cemetery, OH
34. Mammoth Cave National Park, KY
35. West Baden Springs Hotel, IN
36. Abraham Lincoln’s Home, IL
37. Gateway Arch, MO
38. C. W. Parker Carousel Museum, KS
39. Terrace Hill Governor’s Mansion, IA
40. Taliesin, WI
41. Fort Snelling, MN
42. Ashfall Fossil Bed, NE
43. Mount Rushmore, SD
44. Fort Union Trading Post, ND
45. Glacier National Park, MT
46. Hanford Site, WA
47. Columbia River Highway, OR
48. San Francisco Cable Cars, CA
49. San Andreas Fault, CA
50. Hoover Dam, NV

US Landmarks Map


US Major Cities Map

Friday, February 13, 2015

Speeding Up RAID Operations on Synology NAS


There are a few things you can do to speed up the process of RAID operations, SSH to your NAS as admin and enter the following commands (change md3 to your device):

# echo 100000 > /proc/sys/dev/raid/speed_limit_min
# echo 32768 > /sys/block/md3/md/stripe_cache_size

The first command increases the minimum “goal” rebuild speeds for when there’s non-rebuild activity. 

The second command increases the stripe cache size which increases sync performance by allowing a larger cache to synchronise the read and write operations on the array.  This is only available for RAID 5 volumes and it does decrease the amount of available system RAM but I never saw 100% utilisation on the DiskStation.

You can monitor the process with the following commands:

# cat /proc/mdstat
# cat /sys/block/md5/md/stripe_cache_size
# cat /proc/sys/dev/raid/speed_limit_min
It also works for speeding up volume consistency checks as they both read the same config. Remember the commands above will only set those options until the NAS is rebooted.


Verifying the status of RAID arrays

We can check the status of the arrays on the system with:
1
cat /proc/mdstat
or
1
mdadm --detail /dev/md0
The output of this command will look like:

1
2
3
4
5
6
7
8
9
10
cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md1 : active raid1 sdb3[1] sda3[0]
19542976 blocks [2/2] [UU]

md2 : active raid1 sdb4[1] sda4[0]
223504192 blocks [2/2] [UU]