Sunday, September 15, 2013

Using bookmarklets to open websites in new tabs

Recently, there was a situation where I needed to have a site open in a new tab.  I had to send multiple GET requests to a certain website to show a friend that the received responses were not always the same.  At the time I was using a portable version of the Pale Moon browser (Firefox fork) and didn't want to mess with searching for an add-on that was capable of the task so instead I came up with a simple solution:  Use a bookmarklet and keep visible on the bookmark's bar. That way I could manually tap the bookmark and load multiple tabs of the site I needed. To do that, I just created a bookmark with the location:

javascript:void(window.open("https://[website here]/"));

That's it.

Tuesday, September 10, 2013

Using the RIGHT-TO-LEFT OVERRIDE (RLO) unicode character to bypass content-filtering systems

This technique is nothing new but I keep finding myself trying to remember the character code for it. So I'm posting this as a personal reminder:

javascript:document.write(String.fromCharCode(8238) + 'desrever');

Tuesday, July 16, 2013

Add "Run CCleaner & Shutdown" to the context menu of the Recycle Bin

If you're concerned about your privacy or mistakenly having your laptop's volume maximized while booting your laptop up in a public place then this is a registry tweak for you.

These instructions operate under the following assumptions:
  1. CCleaner is installed to C:\Program Files\CCleaner
  2. A copy of NirCmd (nircmd.exe) has been placed in your system folder at %SystemRoot%\System32
 Windows Registry Editor Version 5.00  
   
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\Run CCleaner && Shutdown]  
   
 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shell\Run CCleaner && Shutdown\command]  
 @="cmd.exe /c nircmd.exe setsysvolume 8738 & \"\"\"%%ProgramFiles%%\\CCleaner\\CCleaner.exe\"\"\" /AUTO /SHUTDOWN"  
Save the file as "addCCleanerToRecycleBin.reg"

Double-click on "addCCleanerToRecycleBin.reg" to execute. If everything went as expected, if you right-click on your Recycle Bin you should see a new menu item: "Run CCleaner & Shutdown". Selecting this menu item will execute NirCmd's setsysvolume function which will lower the system's volume to 8738 (of 65535). Afterwards, CCleaner will execute using the current set of saved options* and upon finishing will shutdown the computer.

*To ensure the highest level of security when cleaning files, enable the "Secure file deletion" option within CCleaner.

Displaying thumbnails from Everything search engine using IrfanView

Everything search engine by voidtools is a great piece of software which I would highly recommend to users looking for a replacement to Windows' built-in search feature. Unfortunately in it's current state, Everything search engine does not allow the option of viewing image thumbnails. One way to work around this problem is to generate a list of all image filenames and import them into IrfanView.

These instructions operate under the following assumptions:
  1. Everything search engine along with "es.exe" (Everything's command-line interface) are installed to C:\Program Files\Everything
  2. IrfanView is installed to C:\Program Files\IrfanView
Open up Notepad (notepad.exe) and paste the following:
 @echo off  
 set ImageFileTypes=gif, jpeg, jpg, png, psd  
 for %%a in (%ImageFileTypes%) do (  
      "%ProgramFiles%\Everything\es.exe" -s ""*.%%a"" >> "%Temp%\images.txt"  
 )  
 "%ProgramFiles%\IrfanView\i_view32.exe" /filelist="%Temp%\images.txt" /thumbs  
 del /f /q "%Temp%\images.txt"  
Save the file as "previewImages.bat"

Make sure Everything search engine is running before executing "previewImages.bat"