Skip to main content

Posts

Showing posts with the label Windows

Keyboard shortcut for 'paste as plain text' in Pidgin

I use Pidgin at work for communicating with my remote colleagues and I regularly paste code snippets and log file output into the Pidgin window. Often the text formats completely wrong and you end up sending the recipient a page of garbage rather than the real text. Pidgin has a right-click context menu option for getting round this called 'paste as plain text' which normally does the trick but what if you normally use CTRL-V to paste your text in? After 2 seconds of experimentation today I found that CTRL-SHIFT-V is the keyboard shortcut for 'paste as plain text', I now feel complete...

How to use Junction if you want Symbolic links in Windows XP

Ever since I started developing using Unix machines I've wanted symbolic links in Windows XP.  A recent pursuit of backup solutions left me really wanting symbolic links so I started the search.  This blog post gave me everything I needed, using a tool from Microsoft's website called junction . This command line tool created junction points between a symbolic name and a real folder on your hard drive (sorry network drives cannot be linked to). I downloaded it and placed the junction.exe file in my C:\WINDOWS\system32 directory so it would be on my system path. Below is my little walk-through of how to use junction . I created a folder on my desktop called "junction test" and created a folder inside that called "folder": I created a text file called "README.txt" inside the "folder" directory: I opened a Windows DOS prompt (cmd) and navigated to the "junction test" folder on my desktop, then I ran the junction co...

Paste Email Plus - perfect for multiple text snippets in Firefox

I've found recently when commenting on various blogs that I want to add a little footer to the comment with my name and blog address. For one or two comments typing it out by hand is fine but after a while I decided to try and find an automated way to deal with this issue. So I was looking for something that allows me to enter multiple lines of text and then very easily insert this text wherever I choose. Well I quickly found the perfect solution - a Firefox add-on called Paste Email Plus by Chuck Baker . You simply open the Paste Email Plus options window, enter a 'Label' to help identify this text, then enter the multi-line text in the 'Pastetext' field and click 'Save changes': You are now set up and ready to start pasting that text snippet, in any area where you would normally type text just right-click and select 'Paste Email Plus' (below 'Paste' on my system) and then choose your labelled snippet: You will now see your ...

JavaScript splits & matches with regular expressions (regex)

I had been developing some client-side validation code in jQuery / JavaScript and using Firefox (and the excellent Firebug ) to test and debug it. I was then asked to ensure that it worked in IE6 & IE7 and that's when the problems started. Apart from the usual "which file does that line number equate to, and why does it not tie up?" issues I found that IE doesn't like taking a regular expression as it's parameter to the JavaScript split function . Firefox will happily accept this and works fine but IE doesn't. After some searching it appears that Firefox might be the odd one out and that it's non-standard to pass in a regex. So what do you do if you want to split up a string based on a regular expression or rather a rule that can't be simply expressed in the way that the split function wants it? Wouldn't it be nice if you could ask if a string matches a regex but then use certain matched bits of the string in your next few lines of c...

How to disable the auto-completion 'bell' in Cygwin (using RXVT)

If you have ever hit TAB a few times in bash (via RXVT) you will probably be greeted with the loudest 'bell' your PC can muster. After a while this gets pretty annoying so here's how to disable it if you are using RXVT inside Cygwin (this might work for other Cygwin terminals, I've just not checked) Navigate to your home directory (normally just by typing cd and either edit or create a file called .inputrc Add the following lines to the .inputrc file: # Disable the annoying bell set bell-style none Save the file, close the terminal and reopen - you should now be bell-less! Technorati Tags: Cygwin , RXVT , Andrew Beacock

How to get Scala working with the RXVT terminal on Cygwin

Out of the box Scala support Cygwin , but this is only with the Windows command prompt-based bash terminal. If you have opted for the more UNIX-like terminal of RXVT then you will find that although the interactive Scala interpreter runs, you can't get it to do anything! This has been raised as a bug ( Ticket #2097 ) against the Scala project and graehl even posted a patch to changed the generation of the scala runtime scripts.  As my Scala install was based on the downloaded Windows binaries ( scala-2.7.6.final.zip ) I couldn't directly use this patch, but I could examine it to see what graehl's fix was. It appears that the key bit was to add the following Java command line option to the java statement that starts the scala interactive interpreter: -Djline.terminal=jline.UnixTerminal So the last line of my bin/scala file is: exec "${JAVACMD:=java}" $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLA...

Use Pidgin? Send screenshots with this great new plugin!

I've been a big fan of Pidgin (formerly Gaim) for the past few years and one feature that I've always wanted was an easy way to send a screenshot to a buddy. Well Raoul Berger obviously wanted it too and he's gone and developed the excellent 'send screenshot' plugin . Download and install it and make sure you have enabled it: Then you can right-click and buddy in your buddy list and choose 'Send screen capture...' - your screen then darkens and you have a crosshair with which to select the region that you would like to send to you 'buddy': You can also send a screenshot within a existing conversation by choosing the 'Convesation' -> 'More' -> 'Send screen capture...' option: Another and fast, better way is to ensure that you have 'Show detailed information' selected in the 'Conversations' tab of the preferences and then you can simply right-click on the person's banner and select the op...

Installing Ubuntu inside Windows XP using VirtualBox

Since moving companies over a year ago I've missed my Ubuntu desktop having moved back to development on Windows. I've had a few comments that some of my old Ubuntu blog posts are now out of date and I've wanted a way to ensure that they remain 'correct'. After discussing virtualisation with a friend I opted to install VirtualBox - an open source virtualization tool which is free and easy to get going. This blog post contains my installation notes from installing VirtualBox and then creating an Ubuntu9 virtual machine... First I downloaded the latest version of VirtualBox (version 3.0.0) and selected the "VirtualBox 3.0.0 for Windows hosts". Then I downloaded the latest version of the Ubuntu Desktop edition . After both of these were fully downloaded I double-clicked the VirtualBox installer and choose to install everything. When the "not passed Windows Logo testing" alerts pop-up choose to "Continue anyway" then register if you w...

Improving slow wifi bandwidth performance on an Acer Aspire One

We've noticed over the past few days that it was taking a long time to download stuff on our Acer Aspire One . Tonight I found out that it was only slow when it was unplugged from the mains - so it's a power-saving 'feature'. I couldn't find any options within the power saving section of Windows control panel, so it was off to google for some help. Within seconds I found the perfect solution explained very clearly over on Peve's Blog . I'm not going to repeat his instructions as he explains it great already so head over there to read his post entitled Acer Aspire One Slow Wifi - Thanks Peve! Technorati Tags: Acer , Aspire One , Wifi , Apevere , Andrew Beacock

How to copy recorded TV programmes off your PVR (Humax 9200T)

We have had a Humax 9200T PVR for quite some time now and occasionally we have wanted a more portable copy (think DVD) of a particular programme that we have recorded. If you flip down the right-hand panel you will notice an unlabelled standard USB B socket . It's by the use of this socket that you can stream recorded programmes off the Humax and onto a PC ready for converting to a DVD (or just watching on the PC). Here's how you do it: Visit Humax's support site and download & install their rather old and flaky Media E-Linker software (Click the "Media E-Linker software (Version 2.5) download link). Get a regular USB lead with an 'A' type plug on one end, and a 'B' type plug on the other. Plug the 'B' end into the Humax, and the 'A' into any USB socket on your PC. Your PC should now 'find' the Humax and request to install the drivers, I let mine 'auto-search' and it found and installed the drivers just fine (I t...

Replace your broadband provider's DNS servers with OpenDNS ones for more reliable service

I had an 'internet issue' last week when around 10am my connection to the internet was lost. Well not completely lost - my work PC (a remote box accessed via VPN ) was still working fine so I still had a connection (at an IP level), but I couldn't visit any websites. The problem was that Pipex's DNS servers were offline (I couldn't ping them) and it wasn't planned maintenance. So I replace them with settings for the free OpenDNS servers . These DNS servers are used by millions of people around the world, I suppose I've not migrated to them before because I've not had an issue until now. The migration couldn't have been easier - I logged into my router , accessed the 'internet settings' menu option, and selected 'DNS'. Then I unticked the "Automatic from ISP" box and entered the OpenDNS server details in the IP address boxes: The OpenDNS DNS server IP addresses are: Primary DNS Server: 208.67.222.222 Secondary DNS Ser...

Acer Aspire One: Backing up the hidden Windows XP factory image partition

My wife recently got the Windows XP 160GB version of the amazing popular Acer Aspire One (this seems to be the only netbook people ever have!). I'd heard from a friend that we should save off the backup image which is preloaded onto a hidden partition (called PQSERVICE). But how do you gain access to the partition in order to save it off? After much research I came up with the following options: Install Linux on a USB pendrive, boot from that, then save the partition using Linux tools Hack the master boot record to remove the 'hidden' attribute of the partition, then save it somehow Numerous other tough/dangerous/involved methods Follow my method below which is easy, safe and free! Here are the steps you need to follow to be able to save off a backup image of the factory install of your Acer Aspire One as well as save a copy of your Master Boot Record (MBR) incase your hard drive dies... Saving your hidden PQSERVICE partition Download the free version of Macrium Reflect...

Easy, collaborative web UI mockups with Balsamiq

Every now and again you come across a tool that is so easy to understand, so fast to use and so effective at conveying it's ideas that you just have to tell people about it. One such tool is Mockups by Balsamic . It's a web page mockup drawing tool written using Adobe Air which provides a palette of HTML widgets with which to 'draw' your screens. It has a querky 'freehand' style which lends itself to conveying the components and ideas that a web page should have without forcing the designer to code it up in HTML (or for the customer to think that because the HTML is done, the app must nearly be ready...). Here is a very simple web page for search and listing users which I ' mocked up ' in less than 10 minutes: As you can see it's got a number of standard HTML widgets on it as well as a very useful 'post it' note allowing you to add distinctive notes and comments to the mockups themselves. So this in itself is enough to warrant using it to...

How to move an existing Cygwin installation

Although Cygwin is a self-contained installation with little in the way of the normal tendrils hooked into the dark shady corners of Windows there are a few hidden catches to moving an existing installation. Cygwin creates a number of mount points for your drives, and it's these that cause the problems when you move your installation directory around. Here are the steps to move your Cygwin installation: Save off existing mount points mount -m > /usr/bin/mountCommands.bat Unmount existing mount points umount -A Copy Cygwin directory to new home Update any Windows shortcuts & Start Menu items Update the Cgywin path within $CYGWIN_HOME/cygwin.bat Update mount points within $CYGWIN_HOME/bin/mountCommands.bat Re-mount to new location Start Cygwin ./mountCommands.bat Close Cygwin Restart Cygwin, and carry on with life This tip was compiled from information about Backup Your Cygwin installation Technorati Tags: Windows , Unix , Linux , Terminal , Cygwin , Installation , ...

How to increase the colour depth of Windows Remote Desktop (RDP) up to 24-bit

I use RDP to access my work PC on a daily basis and one of the limiting factors when doing web design has been the lack of colour depth - rather than the standard 24-bit (or higher) you get 15-bit due to using Remote Desktop (RDP). Although this is the default RDP server setting, you can increase it to 24-bit with a little Windows Registry hack. NOTE: If you mess up your machine from hack your registry - please don't blame me, I'm only giving you the tool to do that damage... Open regedit and browse to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp Over on the right-hand side you will see an attribute called "ColorDepth" which by default is set to 3 (or rather 0x00000003, it's a DWORD). Double-click that attribute and change the Value data field from 3 to 4, then click "OK", close regedit and reboot your PC. Now if you increase the requested colour depth when connecting to this machine you should get a few...

How to get the Home & End keys working in Cygwin (RXVT)

Last year I blogged about how to get the Home & End keys working in remote Linux shells & terminals . Well now it's time to sort the Windows shell Cygwin out. If your Home and End keys are producing funny characters on the command line rather than moving the cursor then the input codes of the keyboard need to be remapped. Open your Cygwin terminal and create a file called .inputrc in your home directory, and add the following: # Home Key "\e[7~":beginning-of-line # End Key "\e[8~":end-of-line # Delete Key "\e[3~":delete-char # Insert Key "\e[2~":paste-from-clipboard Now edit or create .bashrc in your home directory and add the following line to ensure the above .inputrc file is picked up: export INPUTRC=$HOME/.inputrc To see if all the above has worked, reopen your cygwin terminal and try it out! If it doesn't work then just delete the .inputrc file and remove the line from .bashrc. Technorati Tags: Keyboard , Mapping , Window...

RXVT - a better console for Cygwin (Unix on Windows)

If you use Windows for software development you will have probably come across Cygwin at some point, the Unix shell for Windows (well a bit of a fake console but it will have to do!). The console out of the box is a bash shell running within a normal Windows cmd prompt box, which is ok but doesn't really give you all the features of a proper Unix shell, click and drag to select text, middle click to paste, decent scroll buffers, etc. However there is a solution to these issues - scrap the silly Windows DOS box and run RXVT instead! First off you will have to run the Cygwin installer again (don't worry it's quite clever and won't corrupt your current version of Cygwin) and select the rxvt terminal package to install. Then continue the installation as normal so that you are left with the Bash shell shortcut icon. You will now need to replace the normal DOS box bash terminal with the new RXVT one. Right-click on the shell shortcut and change the "target" an...

Restoring disappeared context menu items in Eclipse

A recent problem we have had with Eclipse is where on one particular developer's PCs some of the options in the right-click context menu were not available. These options were also only not available on non-'build path' source folders. It was a very strange issue but we did manage to solve it: Choose the 'Reset Perspective' option from the 'Window' menu to restore all the default options which includes the right-click context menus! Technorati Tags: , Eclipse , Andrew Beacock

How to auto-fill lots of columns or cells with the same value in Excel

I had a spreadsheet recently (actually a CSV file which contained numerous columns of data. The values in the cells were either blank (empty) or the letter 'Y'. I needed to change all the blanks to 'N'. Find and replace didn't work as you can't specify blank as a matching character (at least I couldn't find out how, please comment if you know!) and I didn't have the energy or time to manually update each cell. After some research I found that the answer was the 'Goto -> Special' options hidden within the 'Edit' menu. Here's how to do it... Select the columns and/or cells that you want to perform the special find within (hold down CTRL as you click the column headers or individual cells. Click the 'Edit' menu and select 'Go To...': Then click the 'Special...' button: Then click the 'Blanks' option and click 'OK': Any cells within your selection that contain blanks will now be selected leav...

Using ampersands (&) without variable substitution in Oracle either direct or with SQL*Plus

Oracle uses the ampersand (&) symbol within a string to indicate a substitution variable. But what if you want to use an ampersand as part of a regular string such as 'Bob & Sons'? There are two solutions that I know of and which one you use depends on the context in which you are running your SQL: Dealing with the ampersand on an SQL level To turn off interpreting the ampersand as a substitution variable it must be at the end of a string: insert into companies values ('Bob &' || ' Sons'); Dealing with the ampersand when using SQL*Plus To disable Oracle's variable substitution and therefore return & to the pool of standard characters you need to tell SQL*Plus to disable it: set define off Add that to the top of your Oracle SQL script or type it manually at the SQL*Plus prompt. These tips plus many more can be found within the rather useful The Oracle (tm) Users' Co-Operative FAQ . Technorati Tags: Oracle , Database , Ampersand , Variable ...