Skip to main content

Posts

Storing passwords in PuTTY

How to save SSH username/password for auto login in PuTTy The answer is you can't do it...at least in plain PuTTy. However there is an awesome fork with that let's you store the username and password and other additional features called KiTTy . So grab yourself a copy and +1 this if you do, thanks.

Eclipse Auto Refresh Browser on Save

Automatically refresh the browser window when saving a file in Eclipse IDE All of my Django webdesign (yes SEOing there) work is done in the excellent and plugin rich Eclipse IDE on a Windows machine. The edit/preview workflow pattern is make some change, save the files (CTR+S), swtich to browser (ALT+Tab), refresh the windows (F5), switch back to Eclipse IDE (ALT+Tab) and rinse and repeat. Even though I can do this quickly it is repetitive and cumbersome and the seconds it takes turn into minutes and hours wasted over many projects. Googling you will find posts that show how to automate the Alt+Tab F5 Alt+Tab sequence using VBScript and setting it as an automatic builder in Eclipse. Now this is a good enough solution and it does work very well except that it does not work with all browsers. Google Chrome being one of them where the SendKeys seem to be ignored. However using an alternative utility NirCmd I was able to make it work as follows: Download NirCmd and extract...

/bin/bash^M: bad interpreter Error

Eclipse file saving and /bin/bash^M: bad interpreter The source of the error is having a bash file saved with line delimiter in Windows style rather the Unix format. To fix this you can use the 'dos2unix' linux utiltiy: $> aptitude install dos2unix The following NEW packages will be installed: dos2unix 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. $> dos2unix <file_to_fix>.sh dos2unix: converting file <file_to_fix>.sh to UNIX format ... Eclipse new line delimter setting But this post is about setting the Eclipse IDE to save in the Unix format, so let's get to it. To do so, right click on the 'project' in your navigation pane, select 'properties', and under the 'Resource' tab ensure to specify the 'New text file line delimiter' is set to Unix as shown above; while you at it select the same encoding as on your server which most likley is ...

Windows WebDAV Double Authentication 401 Requets

Speed up trick for Windows 7 WebDAV Client One way to conveniently develop remotely with Eclipse + PyDev is to run WebDAV on the remote server and map it as a networked drive in Windows (PyDev over Eclipse Target Managmenet does not play nicely). WebDAV works rather well except it is not the fastest especially on initial project creation /project refreshing and if your share is protected with a username/password; below is how I improved the performance. Apparently by protocol design and due to security Windows 7 client does not cache it's authentication and so on each request first an anonymous attempt is made followed by an authenticated one: ... 72.38.184.18 - - [22/Jan/2013:23:05:04 +0000] "PROPFIND /Files HTTP/1.0" 401 751 72.38.184.18 - username [22/Mar/2011:23:05:04 +0000] "PROPFIND /Files HTTP/1.0" 301 495 72.38.184.18 - - [22/Jan/2013:23:05:04 +0000] "PROPFIND /Files/ HTTP/1.0" 401 751 72.38.184.18 - username [22/Mar/2011:23:05:04 +0000]...

GeoDjango + Spatialite (SQLite3) Setup Issues

Because there are fresh ones every time I start a new project! As of May 03 2013 I have opted to install virtualenv --system-site-packages and running aptitude-install python-pysqlite2 spatialite-bin gdal-bin ; the site are not as self contained any more but sure beats fighting with the issues. All my Django projects are self contained (as much as possible) with Virtualenv and use Spatialite database (SQLite3 +geo spatial stuff) installed so to enable GeoDjango functionality. This post is a list of issues I encounter related to that setup and how I resolved them; as I seem to run into a new one on every project start. And as always if you found this useful do +1, or follow me on twitter @danielsokolows /usr/include/spatialite.h:61: note: previous declaration of ‘spatialite_init’ was here Say what? --- this one threw me for a three hour fun time. It happened because I executed 'pip install pyspatialite' will install the 3.X vesion which is is broken and craps out with: ...

HTTPS and drop in Google Web Master Tools Impressions

Switched site to HTTPS and impressions and visits plummeted In an attempt to resolve the (No Provided) issue in Google Analytics I have switched our site Kingston Search Engine Optimization [yes I am doing SEO backlinking there :)] to HTTPS and experienced a massive drop in impressions and visits. Google Analytics reported no change in actual visits so the issue was left alone to hopefully sort itself out; but it didn't. By the way switching to HTTPS will not resolve the missing keywords in GA, if you analyze the browser requests you will notice Google just plainly strips them from the referral header information. Solution to HTTPS impression drop This was a mystery for a while until today when I found a solution which is very simple. By default Google Web Master Tools creates and tracks sites under HTTP protocol, and treats HTTPS as different sites entirely, just like it treats www.webdesign.danols.com and webdesign.danols.com as separate sites. Creating a new entry th...

Django Template Eclipse Editor Plugin

Aptana Eclipse Django template editor alternative A solid lightweight alternative to Aptana Django template editor Eclipse plug-in. Definitively worth at a test drive - which is what I am doing now - since I have refrained from installing the Aptana alternative due to it's dependencies. You can download it here: Django Editor - plug-in for Eclipse . One shortcoming however is that HTML and JS editing is bare bones with no content assist, this is expected thought and can be mitigated by switching to a specialized editor as needed.