16
2011
Create ISO from CD DVD on Ubuntu
To create an iso from a cd/dvd. 1. Put the disc into the drive. 2. Use the command cat /dev/cdrom > ~/disc.iso Or use K3B to create iso , or the command mkisofs
14
2011
For Loops in Ruby
There is no C++/Java/PHP type for loop in Ruby like this – for( init, while-condition, increment ) { // code here } So i just tried to write one in Ruby for fun, here is the code – So whats going on ? 1. First of all, the loop method in Ruby accepts a block and loops over it until a break is encountered. 2. ->{x < 5} and ->{x += 1} are basically shorter [...]
13
2011
htaccess php_flag not allowed here
If using this code gives the error : .htaccess: php_flag not allowed here in /var/log/apache/error.log Then Options should be added to AllowOverride in : /etc/apache2/sites-available/default AllowOverride FileInfo Options like this
8
2011
Google Chrome hindi font problem on Ubuntu
Google Chrome has problems displaying hindi and other Indian language fonts on Ubuntu. This problem can be partially solved by : 1. Uninstalling the ttf-mscorefonts. 2. Rename or remove ~/.fonts.conf Firefox does not have such a problem. Alternatives on Ubuntu are the Arora and Rekonq browsers which are based on webkit and can display hindi fonts very well.
6
2011
Web Based vs Desktop Based Softwares
A Web Based application has several significant advantages over a desktop/installable application – 1. Multi-terminal access. 2. Auto-Backups, so your data is always backed up and safe. With desktop/installable softwares you will have to manage your data, backup and make sure everything is safe which is hard work and time consuming. 3. Access from anywhere, no need to install. With a desktop software, your access point is “one” but with web based, you can access from anywhere and everywhere. 4. [...]
6
2011
PHP Urlencode equivalent in Ruby
If you are finding a way to encode urls in ruby then here is a quick tip – Short Answer: You could use the URI class or the CGI class. We have CGI.escape and URI.escape, but they have some slight differences. I have tried to show the differences in IRB as follows – So i hope you can see the difference now and can choose the one you need. Cheers!
2
2011
Find where a method is defined in Ruby
There are times when you might be working on a codebase with other people and spot a method which you do not know about. You may want to locate the source of that method to learn and understand more about its functionality. So, Here is a quick tip on how to find where a method is defined or located. I was working on a project where i found this piece of code – var = [...]
Subscribe
Recent Posts
- C code to perform IP whois
- Turbotrace – a free multithreaded and visual traceroute utility for windows and linux
- Function pread for windows
- Quick Tip: Getting the Next and Previous Items or Posts
- Compile wxwebconnect on Ubuntu 11.04 64 bit
- Disqus Comments Importer Script in PHP
- Beginners’ guide to socket programming with winsock
- Handle multiple socket connections with fd_set and select on Linux
- Beginners guide to socket programming in C on Linux
- Gui whois client in python with wxpython
An article by Binary Tides