Display IP Address of users browser

< ?php
 // the IP address is unknown, so it equals to "%s" now.
 $urlTemplate = 'http://api.ip2location.com/?' . 'ip=%s&key=demo' .  '&package=WS10&format=json';
 // Current browser session
 $ip = $_SERVER['REMOTE_ADDR']?:($_SERVER['HTTP_X_FORWARDED_FOR']?:$_SERVER['HTTP_CLIENT_IP']);

 $urlToCall = sprintf( $urlTemplate, $ip);

 $rawJson = file_get_contents( $urlToCall );

 $geoLocation = json_decode( $rawJson, true );

 echo 'Hello to ', $geoLocation['city_name'];

?>

Best Sports Trip Weekends 2015

Boston
Dec 4, 2015 | Boston Bruins vs Calgary Flames | NHL
Dec 5, 2015 | Boston Celtics vs San Antonio Spurs | NBA
Dec 6, 2015 | New England Patriots vs Philadelphia Eagles | NFL

Chicago
Nov 20, 2015 | Chicago Bulls vs Golden State Warriors | NBA
Nov 21, 2015 | Chicago Blackhawks vs Vancouver Canucks | NHL
Nov 22, 2015 | Chicago Bears vs Denver Broncos  | NFL

New York
Nov 13, 2015 | Brooklyn Nets vs Sacramento Kings |NBA
Nov 13, 2015 | New York Islanders vs Anaheim Ducks | NHL
Nov 14, 2015 | Brooklyn Nets vs Golden State Warriors | NBA
Nov 14, 2015 | New York Rangers vs Ottawa Senators | NHL
Nov 15, 2015 | New York Giants vs New England Patriots | NFL

Nov 27, 2015 | New York Islanders vs Florida Panthers | NHL
Nov 27, 2015 | New York Rangers vs Boston Bruins | NHL
Nov 28, 2015 | Brooklyn Nets vs Cleveland Cavaliers | NBA
Nov 28, 2015 | New York Islanders vs Tampa Bay Lightning | NHL
Nov 29, 2015 | New York Jets vs Miami Dolphins | NFL

Dec 4, 2015 | Brooklyn Nets vs New York Knicks | NBA
Dec 5, 2015 | New York Knicks vs Milwaukee Bucks | NBA
Dec 5, 2015 | New York Islanders vs Ottawa Senators | NHL
Dec 6, 2015 | New York Giants vs New York Jets | NFL

Dec 11, 2015 | New York Rangers vs Edmonton Oilers | NHL
Dec 12, 2015 | New York Knicks vs Portland Trail Blazers | NBA
Dec 12, 2015 | New York Islanders vs Columbus Blue Jackets | NHL
Dec 12, 2015 | New York Rangers vs Calgary Flames | NHL
Dec 13, 2015 | New York Jets vs Tennessee Titans | NFL

Dec 18, 2015 | Brooklyn Nets vs Indiana Pacers| NBA
Dec 18, 2015 | New York Knicks vs Philadelphia 76ers | NBA
Dec 18, 2015 | New York Rangers vs Winnipeg Jets | NHL
Dec 19, 2015 | New York Islanders vs Arizona Coyotes | NHL
Dec 20, 2015 | New York Giants vs Carolina Panthers | NFL

Phoenix
Nov 20, 2015 | Phoenix Suns vs Denver Nuggets | NBA
Nov 21, 2015 | Arizona Coyotes vs Winnipeg Jets | NHL
Nov 22, 2015 | Phoenix Suns vs New Orleans Pelicans | NBA
Nov 22, 2015 | Arizona Cardinals vs Cincinnati Bengals | NFL

Jan 2, 2016 | Phoenix Suns vs Sacramento Kings | NBA
Jan 2, 2016 | Arizona Coyotes vs Edmonton Oilers | NHL
Jan 3, 2016 | Arizona Cardinals vs Seattle Seahawks | NFL
Jan 3, 2016 | Phoenix Suns vs Los Angeles Lakers | NBA
Jan 4, 2016 | Arizona Coyotes vs Vancouver Canucks | NHL

Toronto
Nov 6, 2015 | Toronto Raptors vs Orlando Magic | NBA
Nov 7, 2015 | Toronto Maple Leafs vs Washington Capitals | NHL
Nov 8, 2015 | Buffalo Bills vs Miami Dolphins | NFL

Washington, DC
Nov 27, 2015 | Washington Wizards vs Boston Celtics | NBA
Nov 28, 2015 | Washington Capitals vs Toronto Maple Leafs | NHL
Nov 29, 2015 | Washington Redskins vs New York Giants | NFL

Sending email with mutt

Simple message with text in the body of the email

mutt -s "Test from domain" user@domain.com < /temp/message.txt

And if you need to send an attachment

mutt -s "Test from domain" user@domain.com < /temp/message.txt -a /temp/file.jpg

This is another way to write the test, having the body in the same line.

echo "This is the body" | mutt -s "Testing mutt" user@domain.com -a /temp/file.jpg

Upload files with pscp

To upload the files the PSCP command line usage in this example will be:
From Windows to Linux.

pscp \ [user@]host:/dir

Upload all firmware files except the .web file using the following commands. You will be asked for the password (= password) for each file:

Examples
pscp.exe C:\DR64_5132\image username@10.0.0.1:

pscp.exe C:\DR64_5132\sbios1 username@10.0.0.1:

pscp.exe C:\DR64_5132\image4.c1 username@10.0.0.1:

pscp.exe C:\DR64_5132\logcodes.txt username@10.0.0.1:

How to add custom log files in logrotate

Create a custom log file within /etc/logrotate.d directory.

touch /etc/logrotate.d/customlog

Add the following to your /etc/logrotate.d/customlog file.

/var/log/customlog
{
 daily
 missingok
 compresscmd=/bin/gzip
 compressext=.gz
 compress
 sharedscripts
# postrotate
# endscript
}


Restart logrotate

sudo /usr/sbin/logrotate /etc/logrotate.conf

Done