Add vertical scrollbar in wordpress.com sourcecode blocks

Sometimes I post sourcecode accompanying my posts which are long and makes the length of the post unnecessarily long. The wordpress.com sourcecode shortcode has an option collapse which you can make “true” to collapse the sourcecode box when the page loads. If you post a long code, when the code box is expanded it will be inconvenient to scroll through the page and read. Also sometimes you might not want to collapse the codebox when the page loads. For this I have a solution. Add vertical bars to the codebox using the div tags.
In this way the length of the code portion in the page remains fixed and to read the code one requires just to scroll in the code box. Checkout what I am talking about in some of the code posts, for example in the posts here and here. Here is how it is done. Continue reading “Add vertical scrollbar in wordpress.com sourcecode blocks”

Advertisements

Change Useragent in Firefox

Firefox LogoThere are some websites which require you to visit them using Internet Explorer only, I don’t know why but there are some. My friend had to download an important document from a site which insisted on using Internet Explorer. We both are in Linux, Fedora. Is there a way? Yes there is. The browser version and certain system details are stored in the browser configuration, and this sting is called the useragent string. The information in this string is used to detect what browser you are using. Therefore if we can modify this string such that it looks like we are using Internet Explorer instead of Firefox, then we can fool the other end. After doing this the server side will believe that you are using an InternetExplorer browser or any other browser (also a different OS), depending on what the useragent string you are using to override the original.

What we need to do is simple. Just create a new entry in firefox browser configuration and set the value to appropriate useragent string. So let’s get started with this short and quick guide.
Continue reading “Change Useragent in Firefox”

Fix dark video in Skype for Linux

fedora_logoI was very much disappointed when i installed Skype in Fedora, three causes which are as follows in the order. First, Skype for Linux is very old version (2.2 beta) than the Windows Skype, second, the video was too dark or black, and third cause surfaced after i installed Fedora 16 x86_64, no 64 bit binary for Fedora was available. The third one was solved as described in this post: Running Skype for Fedora x86 in Fedora x86_64. For the first one i can’t do anything, but there should be some solution for the second problem: dark video. Cheese (a video capture application) works fine and video is good. Searching in the skype forums got a lot of mumbo jumbo solutions of which none worked. After a lot of search i got a very simple solution.

Edit (16.06.2012): The first problem seems to solve atleast upto some extent as Skype 4.0 is now out and can be downloaded here.

Continue reading “Fix dark video in Skype for Linux”

Simple script to restart services automatically when stopped in Fedora/Redhat

fedora_logoWhen occasionally the services like Apache or MySQL or other rc.d script crashes and stops working, then instead of restarting them manually, it may be more desirable to restart them automatically. A friend of mine asked about such an issue and here is the quick fix bash script fix.

Continue reading “Simple script to restart services automatically when stopped in Fedora/Redhat”

Running Skype for Fedora x86 in Fedora x86_64

fedora_logoAfter I installed Fedora 16 x86_64, i needed to install manually Skype for linux, which is available from This link, as it is not in Fedora repositories. After clicking the Skype icon from the kickstart menu, the Skype icon kept bouncing. Skype for linux is not available for 64 bit fedora (till now), and therefore requires 32 bit libraries to run. Problems …

Continue reading “Running Skype for Fedora x86 in Fedora x86_64”

Installing the applications from older version in a new fresh installation of fedora

fedora_logoI was using Fedora 15 32 bit for a long time but i felt the need to install a 64 bit edition for some memory limitations in the system. Therefore I downloaded the Fedora 16 x86_64 iso file from https://fedoraproject.org/ . The main concern was to install the new system with minimum mess and reconfiguration. I have separate root and /home partitions so there is no problem in the home directory restoration.

The main problem was to install the packages which i had manually installed with yum after i installed the distro. This is a common problem when upgrading to another distro, and it is worse in Microsoft Windows, as all the applications needs to be downloaded from the corresponding third party sites, and to restore either you need to surf through those sites, or keep the installations in your disk.
Checkout more

Reviewing the GNUSim8085 (v1.3.7)

This article reviews the GNUSim8085 (v1.3.7) a graphical simulator, assembler and debugger for the Intel 8085 microprocessor.

The Intel 8085 is an 8-bit microprocessor that was launched by Intel in 1977 and hence is something that we have never seen around. So why do we need to learn about the programming model and instruction set of this old microprocessor? The microprocessors we use are all for general-purpose computing but there are other applications of computers such as making automatic solar tracking-panels, automatic power-controls, or security control systems. For such applications, general-purpose CPUs are unnecessary-a waste of resources; a low powered CPU is what we need. The Intel 8085 is one of the candidates. To program this piece of hardware, we first need to know the programming model-the logical structure of the programmable registers, flags, and the instruction set.

Continue reading “Reviewing the GNUSim8085 (v1.3.7)”

Configure Samsung ML-1666 in Fedora

fedora_logoI recently had a problem with my Samsung ML-1666 Monochrome laser printer: I could not configure it in Fedora. Simply downloading the driver from Samsung website and installing seemed easy, but actually did nothing.

Googling for hours did not solve the problem, but I kept trying and finally got it working. So I thought I should write down what I did, it may help you.

Continue reading “Configure Samsung ML-1666 in Fedora”