MacBook Pro – Bluetooth not available
I just experienced that a recent update from Apple rendered my bluetooth functionality completely dead. The status bar icon was greyed out with a horizontal lightning bolt looking icon crossed through it.
After some time on Google, i find i am not the only one ![]()
Solutions listed below worked like a charm..
---
Try resetting the SMC and the PRAM:
http://support.apple.com/kb/HT3964
http://support.apple.com/kb/ht1379
Another solution for a Intel based Macbook Pro..
1. shut down the computer.
2. remove power cord.
3. press the power button for 5 sec.
4. connect the power cord.
Worked excellent
the Euclidean algorithm
Ever heard of the Euclidean algorithm??
From wikipedia:
In mathematics, the Euclidean algorithm[a] (also called Euclid's algorithm) is an efficient method for computing the greatest common divisor (GCD) of two integers, also known as the greatest common factor (GCF) or highest common factor (HCF).
I have just written a short python program for finding the GCD.. Enjoy..
# Efficient method for computing the greatest common divisor # X and Y is the two numbers x=42 y=24 def findGCD(a,b): print a,b if b==0: print "Answer is " + str(a) return a return findGCD(b,a%b) findGCD(x,y)
Gnome – Loosing Maximize Minimize buttons in titlebar
On my Linux Mint installation i have recently experienced that the titlebar is gone. Loosing the minimize,maximize and close buttons.
I have been doing some extensive googling on the problem and found two solutions, whereas only one worked for me.
Open terminal and type :
metacity --replace &
This solution worked on my Linux Mint 11 installation
The solution below did not work for me, but others have stated that it worked on other Gnome based distros.
xfwm4 &
Java – Sudoku solver
A while back I found a small code segment that solves your Sudoku problems.
This code is written for solving the 3x3(blocks) puzzle, where puzzle is an 81 character string representing the puzzle read left-to-right, top-to-bottom, and 0 is a blank.
Java – Using configuration files
I recently came across a situation where i needed a small configuration file in my Java project.
Using XML would in most cases be the way to go, but in this particular situation, using XML would be complete overkill.
I only needed a few variables in my configuration file, and for this, Java has a built-in solution that works great.
Ever heard of .properties files ??
NetHogs – See what process uses your bandwidth
Ever wanted to see what is taking up your bandwidth. There are lots of tools out there for this, but lately I have been taking a closer look at NetHogs.
It is really worth checking out..
NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded. If there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to indentify programs that have gone wild and are suddenly taking up your bandwidth.
Download Nethogs here
Backspace error in SSH sessions – acts as Delete key
In OSX 10.6.xx (Snow Leopard) users who use the Terminal application to SSH into remote servers might experience that the backspace key works as the delete key in some applications (VI, Nano, Pico etc) I have not heard of this happening in any other OS or application, so an easy way to fix this in Terminal configuration on your Mac.
Go to Terminal preferences, select the Advanced tab, and check “Delete sends Ctrl-H”. That’s all it takes to get the “delete” key to work correctly in all applications used in your SSH sessions.

Simple filesharing in Linux – Python HTTPServer
So, want to show something on your machine to another user? Or want to share a file ?
If you have Python installed (default for most *nix systems) the following trick is awesome.
Create the following alias in your .bashrc
alias webshare='python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"'
Now just type the command "webshare" in your terminal, and all files in current folder and beneath will be available at
http://localhost:8000
If you dont want to create an alias, just type the following command in your terminal
python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"
Remember, if you start the webserver in your /home/<username> folder, you share everything in the folder !
CCleaner – Add your custom files or folders for deletion
CrapCleaner is a great tool for removing all sorts of crap, *doh, from your computer.
But many users doesn't know about all features in this program.
Most users often don't bother with exploring what is actually available in different software.
Well, in CCleaner you can add any folder you want, for deletion when you run the Cleaner.
Kill RDP session remotely
If you are using RDP connection in your daily work, you probably have seen the message “The terminal server has exceeded the maximum number of allowed connections”. Luckily, there is way to reset RDP connection remotely from command prompt. I will show you how...