Yum's Random Notes ...
A place where I keep a note of simple but useful technical tips and memorable posts....
Friday, October 9, 2020
Friday, July 10, 2015
application/x-www-form-urlencoded or multipart/form-data?
The MIME types application/x-www-form-urlencoded and multipart/form-data are the two Content-Type headers for HTTP POST requests that user-agents (browsers) must support. The purpose of both of those types of requests is to send a list of name/value pairs to the server. Depending on the type and amount of data being transmitted, one of the methods will be more efficient than the other.
Which is more suitable? http://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
Which is more suitable? http://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
Saturday, December 8, 2012
Installing an svn server and making it accessible
Stole information for the $Subject from these sites:
- http://odyniec.net/articles/ubuntu-subversion-server
- https://help.ubuntu.com/community/Subversion
- http://www.howtogeek.com/howto/ubuntu/install-subversion-with-web-access-on-ubuntu/
- http://stackoverflow.com/questions/60736/how-to-setup-a-subversion-svn-server-on-gnu-linux-ubuntu
Tuesday, September 18, 2012
Remotely connecting to a unix machine in graphical mode
ssh user@host lets you to access a unix machine in command line mode.
But if you need to access its UI, you need to access the graphical mode. This can be achieved by using ssh with X forwarding. This is the command for that.
ssh -X user@host
This will set the DISPLAY variable automatically. The X programs you run will be automatically tunneled back through the ssh connection.
Thursday, March 29, 2012
command-line looping to stress jaggery run-tim
Got to know this is how command line looping is used:
while [ 1 ] do ls -alApplying this to stress command-line jaggery; sleep 60 done
while [ 1 ] do sh jaggery.sh /home/yumani/Documents/projects/jaggery/mine/array/array.jss; sleep 10; done
Tuesday, January 3, 2012
Backup & restore DB2 database
Following will be helpful when you need to backup and restore a db2 database;
To back-up;
Type following command in command editor.
backup db to
<db_name> to <location>
i.e. backup db YUM toc:\db_dump
When this command is successfully executed the following will appear in the response window;
"Backup successful. The timestamp for this backup imageloca is: xxxxxxxxxxx"
The dump will be available in the location you specified with the timestamp (stated above) being part of its name.
i.e. YUM.0.DB2.NODE0000.20120103141256.001
To restore;
Type following command in command editor.
restore db taken at <time-stamp>
i.e. restore db YUM taken at 20120103141256
To back-up;
Type following command in command editor.
backup db
i.e. backup db YUM to
The dump will be available in the location you specified with the timestamp (stated above) being part of its name.
i.e. YUM.0.DB2.NODE0000.20120103141256.001
To restore;
Type following command in command editor.
restore db
Wednesday, December 14, 2011
Copy and paste content from one file to another file in VI
Here are steps:
- Open the file you need to edit
- :sp /path/to/the/file/... and open the file that you need to copy from (this will split the window and open the other file in top section)
- Locate the lines you want to copy. If it 10 lines type 10yy
- Move to the other file using CTRL+ws
- Figure out where you need to paste the yanked lines type p
Tuesday, November 22, 2011
Syntax Highlighting & Word Counter
Syntax highlighting and word count are much needed tools when doing articles/tutorials to wso2.org.
Following are useful links.
syntax highlighting - http://alexgorbatchev.com/SyntaxHighlighter/manual/demo/highlight.html
Word counter - http://www.wordcounttool.com/
Following are useful links.
syntax highlighting - http://alexgorbatchev.com/SyntaxHighlighter/manual/demo/highlight.html
Word counter - http://www.wordcounttool.com/
Sunday, November 20, 2011
s in sed
I was doing an article where I was copying code snippets from a my editor to the article's editor. When switched on to the HTMl view I noticed that there are <p></p> tags added in my source. I was to delete these away to make my code look neater. sed was my time savor.
sed s command is used like this; say I need to replace cool with crap, the command is;
sed -e 's/cool/crap/g'
So for my task, I copied the code snippet to a temp file and ran folliwing shell script to get my source code cleaned up. Nice and cool, love it :)
'/' is a delimiter in sed, so when you use a regular expression with '/' in it you will need to quote it using a backslash (\).
In above I've said to change <p>in temp.txt to a space and copy the updated code in temp1.txt. Then I copy the updated temp1 content to temp.txt and remove </p>s from it.
sed s command is used like this; say I need to replace cool with crap, the command is;
sed -e 's/cool/crap/g'
So for my task, I copied the code snippet to a temp file and ran folliwing shell script to get my source code cleaned up. Nice and cool, love it :)
sed -e 's/<p>/ /g' temp.txt > temp1.txt cp temp1.txt temp.txt sed -e 's/<\/p>/ /g' temp.txt > temp1.txt
'/' is a delimiter in sed, so when you use a regular expression with '/' in it you will need to quote it using a backslash (\).
In above I've said to change <p>in temp.txt to a space and copy the updated code in temp1.txt. Then I copy the updated temp1 content to temp.txt and remove </p>s from it.
Sunday, September 18, 2011
Wednesday, May 4, 2011
Subscribe to:
Posts (Atom)
-
1. Download Derby bin distribution from here . 2. Extract it. 3. Set DERBY_HOME and add it to the path. vi ~/.bashrc Add as below; e...
-
Came across the term "NoSQL" from one of the mail threads in WSO2 carbon-dev mailing list. What is NoSQL, I didn't know it. ...