$ head -c20 /dev/urandom | xxd -ps
Category: World
-
My devel setup on my laptop.
Since, i cannot afford to have an additional H/W setup, i thought of creating my own setup on a virtual environment.
I tried Virtualbox for setting up my virtual env, Because I am more comfortable on it. Download the VirtualBox setup from the virtual box site. Download you favorite Linux/Windows distribution and setup a virtual machine with that. Now, comes the most trickiest part, I really don’t like running multiple windows on my desktop, and unnecessary clutter the way it looks. Moreover, going through the tab becomes slight painful, so, I decided to go headless(of course running it headless).You can run this command to run your virtual machine, without even bother to open your virtualbox application, and can modify your system startup to run it on every boot and shut it down whenever your sytsem is shutting down.
[code language=”bash”]vvboxmanage startvm "DEVELHOST" –type headless # Here Devlehost is my virtualbox name.[/code]
-
Saving your work with github.
Just managed to get my hands on github, have created my repository long back, but hadn’t got time to push anything to it. Couple of days back, must give it a try and here I am, tried, worked and got answers for some of my weired questions, writing it so, it can help me later when redoing it and so to others who may face similar challenges.
-
Solaris Containers
Solaris Containers
There are two types of zones global and non-global. The global zone is the server itself and is used as the system-wide configuration and control, there can only be one global zone per system. A maximum of 8192 non-global zones can exist on a system, all non-global zones are isolated from each other.
There are two type types of non-global zones sparse root zone or whole root zones.
-
emacs todo mode
This tutorial has been posted by Logan Lee on the Usenet (http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/6d55768f621067c6/cec507b4c628b776?pli=1):
(1) To enter todo major mode, M-x todo-mode. (2) Let's jump to the default Todo category. Press 'j' then select 'Todo'. (3) Let's insert a dummy task. Press 'i' then enter description then category that it belongs to. In this case, there is only one category (ie. Todo) so enter 'Todo' as its category. (4) Let's insert another dummy task in order to demonstrate raising or lowering priority of a task or filing a task once it's done. Do this by pressing 'i' again and following the rest of step 3. (5) Now, try pressing 'r' to move the task at cursor up by one line or 'l' to lower it by one line. The line position of a task represents its respective priority. (6) Now, try pressing 'f' at a task to file it. Filing a task means you add it to a file called '.todo-done' located at your home directory. You will see on your screen that the filed task has disappeared from view. (7) Lastly, let's try adding a new category. 'M-x todo-add-category'. First, you will be directed to the source of '.todo-do' file. Don't panic because of unknown syntax shown to your screen. Proceed to step 8 to learn more about the syntax of .todo-do file. (8) The format of .todo-do file: ;; This specifies that "Todo" and "New Category That You Have Added" are ;;+categories of todo-mode. -*- mode: todo; todo-categories: ("Todo","New Category That You Have Added"); -*- */* --------------------------------------------------------------------------- ;; Lists tasks under Todo */* --- Todo */* 2007-01-02 19:12 Dummy Task2 ;; These are dummy tasks from steps 3,4. */* 2007-01-02 19 11 Dummy Task1 ;;+Task2 is higher priority than Task1. --- End ;; Lists tasks under New Category That You Have Added */* --- New Category That You Have Added ;; As you can see there are no tasks belonging to "New Category That You Have Added" ;) --- End (9) There are other commands and associated abbreviations which can be found in Todo item at menu bar. -
Setting up cgi in userdir
enable a CGI directory for every user in apache.
Configure apache for userdir.
[code language=”bash”]
a2enmod userdir
[/code]
open the userdir.conf file and add the following
[code language=”text”]
<Directory /home/*/public_html/cgi-bin/>
Options ExecCGI
SetHandler cgi-script
</Directory>
[/code] -
Setting up networking in Debian
Networking in Debian GNU/Linux
Configure interface in /etc/network/interfaces
[code language=”text”]
iface eth0 inet static
address <ip address>
netmask <netmask>
[/code] -
Working from ipad
This is awesome
-
Resetting the Root Password for mysqld on Unix Systems
“These are taken from the mysql website and is for refrence and documentation purpose”
On Unix, use the following procedure to reset the password for all MySQL
rootaccounts. The instructions assume that you will start the server so that it runs using the Unix login account that you normally use for running the server. For example, if you run the server using themysqllogin account, you should log in asmysqlbefore using the instructions. Alternatively, you can log in asroot, but in this case you must start mysqld with the--user=mysqloption. If you start the server asrootwithout using--user=mysql, the server may createroot-owned files in the data directory, such as log files, and these may cause permission-related problems for future server startups. If that happens, you will need to either change the ownership of the files tomysqlor remove them. (more…) -
Adding routes in AIX
Configuring a gateway in AIX
To configure a machine to act as a gateway, use these instructions.
For clarity, this procedure assumes that the gateway machine
connects two networks, and that the gateway machine has already been minimally
configured on one of the networks. -
AIX commands you should not leave home without
How would I know if I am running a 32-bit kernel or 64-bit kernel?
To display if the kernel is 32-bit enabled or 64-bit enabled, type:
bootinfo -K
-
Creating a DVD repository on AIX,.
Do yourself a favour and get a spot of space (couple of GBs) and get all your media onto this file system with the following commands:
1. Put the first media CD/DVD into your drive – you do not have to mount it.
2. Make sure you have you file system mounted.
3. Look at what filesets are on the media you are about to build:
gencopy -d /dev/cd0 -t /repository-filesystem -U -X -L all | wc -l
gencopy -d /dev/cd0 -t /repository-filesystem -U -X -L all | more
4. Write it out to a file somewhere:
gencopy -d /dev/cd0 -t /repository-filesystem -U -X -L all >/tmp/filename.txt
5. Do the actual copy/repository build:
gencopy -d /dev/cd0 -t /repository-filesystem -U -X all
6. Stick in the next cd/dvd:
7. Redo steps 1 to 6 until you are done.
8. TAKE NOTE that the actual build takes quite some time.
9. ALSO, make sure you have enough space on /var and /tmp to accommodate the lists the o/s builds to do the media build.
Once done, you will have 1 file system with ALL your media filesets in it.
Then do your ‘smitty install’ and check if you can get your rsct.basic.rte sorted. -
if you get the error “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”
install the following files with yourapache, php and mysql installation, mine got fixed by this, hope yours too will
[code language=”text”]
sudo apt-get install phpmyadmin libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql
[/code] -
http with php on use_dir.
Well, it made me do a lot of googling to find how to do set apache2 with php on debian, actaully i think it was working, but since i was trying with userdir, and it was not working, so checked in /etc/apache2/mods-available/php5.conf
# To re-enable php in user directories comment the following lines
# (from <IfModule …> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.and then everything was so easy. Well btw, if facing a problem of php file being downloaded the solution is pretty simple. This could be because Debian’s config puts “application/x-httpd-php php” in its mime.types file, but fortunately the fix is easy. Clear your browser’s cache and restart the browser, and then try again.
Installing Apache 2 and PHP 5 on Debian
Lately a lot of folks on #Apache have requested help with installation of Apache 2[.2] and PHP 5 on Debian-based systems.
Even though this is a rather straightforward process, we have so far neglected to document it. This page provides that documentation.
Preparing your system
Before getting started, you should prepare your system, and before preparing your system, you should prepare yourself. You should know: What do you want to achieve? What technology is best to achieve that goal? What constraints are there?
Now that you know that you want to create a website, using Apache 2, PHP 5 and MySQL, that your knowledge is your only constraint, and that this wiki will help you learn more, you can start preparing your system by typing [either as root, or prefixed with sudo]:
apt-get update
This will download the latest lists of packages, to make sure you install the current versions of the software.
Installing the Software
Installing the required packages is as straightforward as installing any other package on Debian; the trick is knowing what packages you need:
apt-get install apache2-mpm-prefork libapache2-mod-php5
This should actually suffice. Debian’s package mangement system should now automatically chose the missing packages which need to be installed. If you’re running the latest version of Debian [as of this writing: Etch], you might want to also install the latest [and best] version of apache, by explicitly specifying apache2.2-common in the above install command.
If you also need MySQL, adding php5-mysql and mysql-server-5.0, should do the rest of the magic.
After that install is complete, visiting http://localhost/ in your browser should prove that you now have a running web server.
Configuring PHP
As Debian is trying to be extra-friendly, it splits a single package up into all possible and impossible modules. In Apache’s case those modules are called libapache2-mod-something and their configuration files are saved in /etc/apache2/mods-available. To enable a module, you’d type something like:
a2enmod php5
Which will simply symlink /etc/apache2/mods-available/php5.conf and /etc/apache2/mods-available/php5.load to /etc/apache2/mods-enabled/.
If you had php4 installed you might get the following error when restarting apache:
Forcing reload of web server (apache2)...apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php4.load: Cannot load /usr/lib/apache2/modules/libphp4.so into server: /usr/lib/apache2/modules/libphp4.so: cannot open shared object file: No such file or directory failed!
To solve this disable the php4 module:
a2dismod php4
For debian Lenny (5.0) and lower
You’re half done now. The last two things that need to be taken care of are to correct Debian’s default PHP configuration for Apache. You can do this by editing /etc/apache2/mods-available/php5.conf:
Change: AddType application/x-httpd-php .php to: <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> and save the changes.
And now you’ll have to tell Apache to reload its configuration and thus enable PHP:
/etc/init.d/apache2 restart
That’s it. You should now be able to run PHP scripts on your newly installed web server.
-
Solaris Kernel Tuning for Security
The Original link is here -
The most significant Perl::Critic release in a long while.
Perl::Critic 1.094 is on its way to a CPAN mirror near you. There are a number of changes in it, but there’s one in particular that I want to point out. A new policy called Miscellanea::ProhibitUselessNoCritic.
Read more of this story at use Perl.
-
Dynamic CPAN Testers Reports – Phase One
After the last major update to CPAN Testers Reports website, the plan had always been to move to a more dynamic site. While a fully fledged dynamic site is still planned, the move is being made gradually with significant updates. As such the last updates have now been made live.
Read more of this story at use Perl.
-
CPAN Patching with Git
A few months ago, brian posted a blog entry about patching modules using Git. In the ensuing discussion, I pointed at a possible way to automatise the process a step further by punting the generated patch to rt.cpan.org. The hack was well-received and, with (very) minimal coaxing, I was subsequently convinced to expand on the idea for The Perl Review.
Read more of this story at use Perl.
-
Perl 5 now uses Git for version control
acme writes “The Perl Foundation has migrated Perl 5 to the Gitversion control system, making it easier than ever for Perl’s developmentteam to continue to improve the language that powers many websites.” Read below for the full announcement (and the instructions for getting the sources).
Read more of this story at use Perl.