start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
/** | |
* PHP class to convert Latitude & Longitude coordinates into UTM & Lambert Conic Conformal Northing/Easting coordinates. | |
* | |
* This class encapsulates the methods for representing a geographic point on the earth in three different coordinate systema. Lat/Long, UTM and Lambert Conic Conformal. | |
* | |
* Code for datum and UTM conversion was converted from C++ code written by Chuck Gantz (chuck.gantz@globalstar.com) from http://www.gpsy.com/gpsinfo/geotoutm/ | |
* This code was converted into PHP by Brenor Brophy (brenor@sbcglobal.net) and later refactored for PHP 5.3 by Hans Duedal (hd@onlinecity.dk). | |
* |
/* | |
* modified from http://www.voidware.com/moon_phase.htm | |
*/ | |
function getMoonPhase(year, month, day) | |
{ | |
var c = e = jd = b = 0; | |
if (month < 3) { | |
year--; |
<?php | |
$ip = $_SERVER['REMOTE_ADDR']; | |
//echo $ip; | |
// Docs: http://ip-api.com/docs/ | |
// Capped at 250 lookups/min - can unban yourself if you go over http://ip-api.com/docs/unban | |
$xml = simplexml_load_file("http://ip-api.com/xml/".$ip); | |
echo $xml->country; |
# User: ubuntu | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Access keys | |
vim .ssh/authorized_keys | |
# Hostname | |
sudo vim /etc/hostname | |
sudo vim /etc/hosts |
''' | |
Requirements: | |
geographiclib==1.46.3 | |
pyproj==1.9.5.1 | |
geopy==1.11.0 | |
git+https://github.com/xoolive/geodesy@c4eb611cc225908872715f7558ca6a686271327a | |
geo-py==0.4 | |
''' | |
from math import radians, sin, cos, asin, sqrt, pi, atan, atan2, fabs | |
from time import time |
#!/bin/bash | |
# | |
# Usage search-with-gpg path/to/encrypted/files/* | |
# | |
if [ -z "$1" ]; then | |
echo "Usage: $0 'search string' [path/to/encrypted/files/*]"; | |
exit 1; | |
else | |
SEARCH=$1; |
git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
git config --global alias.s status --short
git config --global alias.s status -sb