how-do-i-find-out-what-shell-im-using

ps -p $$

So what is $ argument passed to -p option? Remember $ returns the PID (process identification number) of the current process, and the current process is your shell. So running a ps on that number displays a process status listing of your shell. In that listing you will find the name of your shell (look for CMD column) .

$ ps -p $$

 

 

mdadm raid array lost after reboot

mdadm is a pain, since it doesn’t record the raid settings automatically, after you set everything up, you have to remember to save the mdadm.conf file. What a pain. Anyway, I forgot to do that, and on reboot, it hung my machine saying /dev/md0 was hosed.

So here is how I recovered it.

originally, my stripe was created with:

mdadm -C /dev/md0 –level=raid0 –raid-devices=2 /dev/hda3 /dev/hdc1

and so I was able to recreate the stripe using:

mdadm -A /dev/md0 /dev/hda3 /dev/hdc1

and then mount it with:

mount /dev/md0 /www -t ext3

so then I saved the /etc/mdadm.conf file with:

echo ‘DEVICES /dev/hda3 /dev/hdc1’ > /etc/mdadm.conf
mdadm –detail –scan >> /etc/mdadm.conf

So before adding it back into my /etc/fstab, I reboot, and check that I can mount it

mount /dev/md0 /www -t ext3

and if that works (it did), I add back into /etc/fstab

/dev/md0  /www   ext3   defaults   1 2

and reboot again.

Coutersy: http://blog.bloke.com/2010/03/mdadm-raid-array-lost-after-reboot/

convert-epoch-to-human-readable-date-and-vice-versa

What is epoch time?

The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds (in ISO 8601: 1970-01-01T00:00:00Z). Literally speaking the epoch is Unix time 0 (midnight 1/1/1970), but ‘epoch’ is often used as a synonym for ‘Unix time’. Many Unix systems store epoch dates as a signed 32-bit integer, which might cause problems on January 19, 2038 (known as the Year 2038 problem or Y2038).

 

Human readable time Seconds
1 hour 3600 seconds
1 day 86400 seconds
1 week 604800 seconds
1 month (30.44 days) 2629743 seconds
1 year (365.24 days)  31556926 seconds

 

I use this most of the time to convert it    http://www.epochconverter.com/

php-tips-insert-href-link-in-a-php-code

If the link needs to be inside of the PHP you have two options. Option one is to end the PHP and then reopen it. Here is an example:
<?php
—– My PHP Code—-
?>
<a href=”https://twitter.com/angela_bradley”>My Twitter</a>
<?php
—– My PHP Code—-
?>

The other option is to print or echo the HTML code inside of the PHP. Here is an example:
<?php
Echo “<a href=https://twitter.com/angela_bradley>My Twitter</a>”
?>

WP Twitter Auto Publish Powered By : XYZScripts.com