Skip to content

Instantly share code, notes, and snippets.

View iamprogrammerlk's full-sized avatar
🏠
Programming is like sex, I can't make a mistake.

I am Programmer iamprogrammerlk

🏠
Programming is like sex, I can't make a mistake.
View GitHub Profile
<?php
array(
'AED' => 'United Arab Emirates Dirham',
'AFN' => 'Afghan Afghani',
'ALL' => 'Albanian Lek',
'AMD' => 'Armenian Dram',
'ANG' => 'Netherlands Antilles Guilder',
'AOA' => 'Angolan Kwanza',
'ARS' => 'Argentine Peso',
@iamprogrammerlk
iamprogrammerlk / run_a_program_on_ubuntu_at_startup.md
Last active June 22, 2024 05:34
Run a program on Ubuntu at startup - A cron job setup (Tested on Ubuntu 19.10)

You can use the "crontab -e" command to add a program to the cron job scheduler,

so that it will launch it at startup, even if there is no GUI installed (useful for Ubuntu servers).

First config the cronejob

~$crontab -e

Select the text editor (I choosed NANO by hitting 1)

<?php
// Permanent 301 Redirect via PHP
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://iamprogrammer.lk/");
exit();