:
CLI twitpic
#!/bin/bash #================================================================== # # FILE: cli-twitpic.bash # # USAGE: ./cli-twitpic.bash # # DESCRIPTION: Allows you to upload pic from cli to twitpic and # also update the same as you status in twitter # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Hemanth H.M (), hemanth.hm@gmail.com # VERSION: 1.0 # CREATED: 03/06/2010 01:45:02 AM IST # REVISION: --- #=======================================================
Insert into mysql DB from text files
#!/bin/bash #================================================================== # # FILE: insertDb.sh # # USAGE: ./insert.sh # # DESCRIPTION: Illustration of inserted data from text to DB # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Hemanth H.M (), hemanth.hm@gmail.com # VERSION: 1.0 # CREATED: 03/06/2010 12:30:36 AM IST # REVISION: --- #=================================================================# #Example scenario assume a list with words and meanings with spac
Customizing Bespin
Customizing Bespin with syntax and code highlighting
Read the intro to bespin before you continue
Prereq:
Python 2.5 with simplejson or Python 2.6
Peek into dryice.py :
#!/usr/bin/env python
# Simple script to run dryice conveniently in the Customizable package
import sys
import os
mydir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(mydir, "lib"))
from dryice import tool
tool.main()
Sample json {manifest} :
Bespin the next generation Web code editor
"Bespin is a Mozilla Labs experiment on how to build an extensible Web code editor using HTML 5 technology."
I have tired an experimental embed of Bespin here
Do read more
NS2 on Ubuntu 9.10
To install The Network Simulator - ns-2 we need to bit of circus.
Install dependencies :
$ sudo apt-get install libpcap-dev gcc-4.3 g++-4.3 tcl tk tk8.4-dev tcl8.4-dev xorg-dev sgb
By default gcc version is 4.4, but has ns2 compiles well only will 4.3 we need to downgrade gcc !
Backup the current links and update symbolic links :
$ sudo mv gcc gcc.old
$ sudo mv i486-linux-gnu-gcc i486-linux-gnu-gcc.old
$ sudo ln -s gcc-4.3 gcc
$ sudo ln -s gcc-4.3 i486-linux-gnu-gcc
Download and Install ns2:
Generate index.html for a given directory
#!/bin/bash #Author : Hemanth.HM #Email : hemanth.hm@gmail.com #Purpose : To genrate index.html for a give directory. #Usage : bash index.sh <dir> dir=$1 cwd=`pwd` #Check for input [ -z ${dir} ] && echo "Usage : `basename $0` <dir>" && exit 1 || cd ${dir} # In case the user gives the input as "." [ "${dir}" == "." ] && dir=`pwd` # Collect each file and add them to href's INDEX=`ls -1 ${dir} | sed "s/^.*/ <li\>\<a\ href=\"&\"\>&\<\\/a\>\<\\/li\>/ # Create an index.html file cat > index.html << EOI <html> <head> <style type="text/css">
RSS feed as wallpaper
Pre-Req
convert utility :sudo apt-get install imagemagick
curl utility :sudo apt-get install curl
Any wallpaper : it's called rss.jpg here
The idea is pretty native :
Step 1 : Get the rss feed URL
Step 2 : Scrap for the data
Step 3 : Set the data as wallpaper
Code template
Log file viewer in PHP
<?php // Author : Hemanth.HM // Purpose : To view log file on the browser. function tail($file, $num_to_get=10) { $fp = fopen($file, 'r'); $position = filesize($file); fseek($fp, $position-1); $chunklen = 4096; while($position >= 0) { $position = $position - $chunklen; if ($position < 0) { $chunklen = abs($position); $position=0;} fseek($fp, $position); $data = fread($fp, $chunklen).
AMD ATI Catalyst™ 10.1 Display Driver for GNU/Linux
Dependencies :
XOrg 6.8, 6.9, 7.0, 7.1, 7.2, 7.3 or 7.4
Linux kernel 2.6 or above
glibc version 2.2 or 2.3
POSIX Shared Memory (/dev/shm) support is required for 3D applications
P.S : uninstall the ATI Proprietary Linux Driver before installing a newer version, if installed.
$ cd /usr/share/ati ; sh ./fglrx-uninstall.sh ; sudo reboot
CAUTION : ATI has contributed packaging scripts to allow creation of other packages, but does not necessarily test, verify or warrant the reliability.

Recent comments
1 week 5 days ago
3 weeks 2 days ago
3 weeks 2 days ago
3 weeks 6 days ago
4 weeks 4 days ago
12 weeks 5 days ago
13 weeks 2 days ago
14 weeks 5 days ago
14 weeks 5 days ago
15 weeks 1 day ago