The Secret to Reformatting a Western Digital WD 1TB My Book External Hard Drive « Psychohistory
January 22, 2009 5 Comments
Taken from Adam Nash’s blog Psycohistory. I apologize for not giving credit more explicitly when I first posted the article.
My notes are your notes…
January 22, 2009 5 Comments
Taken from Adam Nash’s blog Psycohistory. I apologize for not giving credit more explicitly when I first posted the article.
November 14, 2008 Leave a comment
CherryPy – CherryPy is a pythonic, object-oriented HTTP framework.
CherryPy allows developers to build web applications in much the same way they would build any other object-oriented Python program. This results in smaller source code developed in less time.
CherryPy is now more than six years old and it is has proven very fast and stable. It is being used in production by many sites, from the simplest ones to the most demanding ones.
Oh, and most importantly: CherryPy is fun to work with :- Here’s how easy it is to write “Hello World” in CherryPy 3:
import cherrypyclass
HelloWorldobject:def indexself:
return "Hello World"
index.exposed = True
cherrypy.quickstartHelloWorld
Examples: Hello World & What is your name?
October 5, 2008 Leave a comment
Enhance your Blog Design with JQuery
JQuery
JQuery is a JavaScript library that simplies event handling, animation, Ajax interactions and much more. The WordPress admin uses JQuery to enhance a variety of sections – the show/hide tabs in the Write page, the lightbox for the media uploader. So it’s already built into WordPress, all we need to do is call it from the front end and use it ourselves.
JQuery is stored at /wp-includes/js/jquery/jquery.js. To use this we need to load it into the header of our page. So we need to add the following line in our header.php theme file, somewhere between the head tags.
view plaincopy to clipboardprint?
<script type=”text/javascript” src=”/wp-includes/js/jquery/jquery.js” charset=”utf-8″></script>
<script type=”text/javascript” src=”/wp-includes/js/jquery/jquery.js” charset=”utf-8″></script>
This will then load the JQuery library whenever someone loads your site. Note, the path will need to reflect your own installation of WordPress on the server. So if you have WordPress installed in the root directory, the above will work, however if you have it in a subdirectory then you’ll need to add this to the start of the source path.
September 30, 2008 Leave a comment
Zero to Continuous Integration with Windmill | Adam Christian
Following ‘automation’ and ‘continuous integration’ in the micro blogging world I have seen a major influx in people being super interested in functionally automating their web apps. I have seen a slew of things about Grid, and Selenium, and people hacking on Watir so I decided to show you from the ground up how incredibly easy it is to get automated test running setup using Windmill and Hudson. I am not going to walk you through every detail, this is much more high level but I do plan to start a ‘continuous integration’ page on getwindmill.com in the near future for those kinds of details.
The first step is to get a couple machines that you want use as slaves and a machine to run Hudson, our setup looks like this:
Each of the machines with a different OS has Windmill installed. To make them slaves you simply bring up the Hudson web page on the machine, and run the launcher.. now it’s a slave — crazy easy right?
Now to setup test runs for the machines, in Hudson you click: “New Job” on the left hand side and do something like the following:
September 29, 2008 Leave a comment
Mac Automation: Quickly add to-dos/events to iCal- The Unofficial Apple Weblog TUAW
How many times have you been watching TV and wanted to quickly add a to-do or event maybe both to iCal? In this Mac Automation post, Im going to show you how to create both a to-do and an iCal event from within Automator. You will be able to add new items to iCal without ever having to open it. Lets begin.
Creating the Automator Workflow New iCal Event
First we need to create an Automator workflow that will add the to-do and event to iCal. To create the workflow, just add the “New iCal Events” action to the workflow area. Before you continue, be sure to click the “Options” button at the bottom of the action and select the “Show this action when the workflow runs” checkbox.
Saving the Automator Workflow
To give you quick and easy access to the creation of iCal events, you can choose the Save As method of your choice.
Running the Workflow
To run the workflow, click the “Run” button in the top-right corner of Automator or launch it as an application. When you run the workflow, you will be presented with a dialog that will ask you to specify a Name, Date, Time, and other information. When you press “Continue,” the workflow will create the event in iCal.
September 12, 2008 1 Comment
Vitamin Features » Easy Automated Web Application Testing with Hudson and Selenium
What will you get out of this article? Our set-up achieves the following:
September 1, 2008 Leave a comment
Installing Apache Tomcat 6 on Mac OS X 10.5 Leopard
Installing Apache Tomcat 6 on OS X 10.5 Leopard is primarily a matter of downloading the appropriate packages and then following the installation instructions. However, you will have to make a few modifications to some make scripts and source code to successfully compile JSVC on Leopard. To compile the MOD_JK connector or the JSVC daemon, you must have OS X development kit installed.
In this document, the environment variable $CATALINA_HOME refers to the directory where you installed the Tomcat binaries and $JAVA_HOME refers to the directory of the JAVA runtime environment. At the time of this writing, Tomcat 6.0.16 is the latest Tomcat 6.0.x release and requires Java 2 Standard Edition 5 J2SE 5.
August 19, 2008 Leave a comment
All about Linux: Enabling and disabling services during start up in GNU/Linux
In any Linux distribution, some services are enabled to start at boot up by default. For example, on my machine, I have pcmcia, cron daemon, postfix mail transport agent … just to name a few, which start during boot up. Usually, it is prudent to disable all services that are not needed as they are potential security risks and also they unnecessarily waste hardware resources. For example, my machine does not have any pcmcia cards so I can safely disable it. Same is the case with postfix which is also not used.
So how do you disable these services so that they are not started at boot time?
The answer to that depends on the type of Linux distribution you are using. True, many Linux distributions including Ubuntu bundle with them a GUI front end to accomplish the task which makes it easier to enable and disable the system services. But there is no standard GUI utility common across all Linux distributions. And this makes it worth while to learn how to enable and disable the services via the command line.
But one thing is common for all Linux distributions which is that all the start-up scripts are stored in the ‘/etc/init.d/’ directory. So if you want to say, enable apache webserver in different run levels, then you should have a script related to the apache webserver in the /etc/init.d/ directory. It is usually created at the time of installing the software. And in my machine (which runs Ubuntu), it is named apache2. Where as in Red Hat, it is named httpd. Usually, the script will have the same name as the process or daemon.
Here I will explain different ways of enabling and disabling the system services.
1) Red Hat Method
Red Hat and Red Hat based Linux distributions make use of the script called chkconfig to enable and disable the system services running in Linux.
For example, to enable the apache webserver to start in certain run levels, you use the chkconfig script to enable it in the desired run levels as follows:
# chkconfig httpd –add
# chkconfig httpd on –level 2,3,5
This will enable the apache webserver to automatically start in the run levels 2, 3 and 5. You can check this by running the command:
# chkconfig –list httpd
One can also disable the service by using the off flag as shown below:
# chkconfig httpd off
# chkconfig httpd –del
Red Hat also has a useful script called service which can be used to start or stop any service. Taking the previous example, to start apache webserver, you execute the command:
# service httpd start
and to stop the service…
# service httpd stop
The options being start, stop and restart which are self explanatory.
July 16, 2008 Leave a comment
The Power of GIT | Innovation On The Run
Started working with git for the first time last week and I am really impressed at how powerful the tool is. I’ve been interested in using a distributed version control system like git, darcs, or mercurial for a while, but I have been turned off on actually making the move because of the lack of integration with these version control systems and other software (bug tracking, automated build software, etc.). Also, as a manager, I did not want to have to retrain a whole team of developers on a new version control system.
But enter git-svn which allows me to use git locally and Subversion for the distributed repository. So now I get the best of both worlds, I can make my local branches and commits, but I don’t have to retrain my team or worry about integration as we still have all of the Subversion interfaces for interacting with the repository.
July 3, 2008 Leave a comment
LyraTechnicalSystems.com » Blog Archive » Moving the Unmovable: Windows Disk Defragmentation Strategies
One problem you may encounter in using the Windows Defragmenter program is “unmovable files” (the green bars) placed in an inconvenient location (on the right side of the display, at the end of your disk). The two most common “unmovable” files are the Windows operating system paging file (pagefile.sys) and the hibernation file (hiberfil.sys) that is used to store system state when the XP operating system goes into “hibernate” mode. An easy solution is to temporarily remove these files, then reinstall them after you’ve resized the NTFS partition.
To temporarily remove pagefile.sys, open the Windows Start menu, right click on MyComputer, select Properties, the Advanced tab, the Performance Settings button, the Advanced tab, and the Virtual Memory Change button (on some versions of XP, you’ll click a Settings button in the Performance box, then click the Advanced tab) . Change the virtual memory size to 0 and click OK to save your changes (select “No paging file” and click Set then OK on some XP versions).
To temporarily remove hiberfil.sys, go to the Windows Control Panel, select Power Options, click the Hibernate tab, and unselect “Enable Hibernation.”
After performing these steps, reboot your system and rerun the Windows Defragmenter. You should no longer see any “unmovable” files, and the final defragmentation result will be much better.
If you’re lucky, preparing your NTFS for resizing will be no more challenging than this. However, when I converted my HP Pavilion desktop to a dual-boot XP/Linux system, preparing the disk for repartitioning was considerably more complicated, and could not be accomplished using only the Windows Defragmenter. There, I had to cope with a Master File Table (MTF) disk area and many boot-related files that were located at the end of the disk. The Windows Defragmenter cannot move these files. To complete the necessary defragmentation I downloaded a trial version of Raxco Software’s PerfectDisk. It proved capable of defragmenting the disk in entirety, though to do this it had to perform a boot time run where it moved the scattered boot fragments from the end to the start of the disk before allowing XP to boot.
Last but not least, remember to reinstall virtual memory (a pagefile.sys file) and, possibly, the hibernation option (hiberfil.sys) after your defragmentation has completed.