Category: Code
Some File Operation in SVN
Moving, Coping and Deletion svn mv file.php to_folder/ #Move svn cp file.php to_folder/ #Copy svn rm file.php #Deletion
Using Ant to Concatenate files
The build.xml file to concatenate files using ant. This can be executed using the command ‘ant “ConcatAll”‘ <?xml version=”1.0″ encoding=”UTF-8″?>…
Execute JavaScript files using Rhino
The command to execute a javascript file using rhino. java -jar /path/to/custom_rhino.jar JS_File.js Get Custom Rhino(From Dojo Library)
Creating a Toolbar in GTK Python(PyGTK)
Creating a toolbar using GTK Python. There is an old method – but this example shows a better method of…
Install Rhino
Installing Rhino(Javascript interpreter created in java) on Fedora 7 sudo yum install rhino-manual rhino-demo rhino
Python Function for Space Units
A Python function to return readable size using the given size(KB) # Returns a more readable format of the given…
Get Result of Command using Python in Linux
Execute a command and get its results using python in Linux import commands result = commands.getoutput(“ls”)
301 Redirect using PHP
301 Redirect using PHP header (‘HTTP/1.1 301 Moved Permanently’); header (‘Location: ‘.$new_location);
Command to Print Until Regular Expression
Print a file until a regular expression is matched. cat file.txt | perl -pe “exit if(/Thats all/)”
CSV Export/Import Functions in PHP
Functions to Export and import CSV data using PHP //*Get the result of the query as a CSV stream. function…
Recent Comments