This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -version 2.0 | |
[CmdletBinding()] | |
param ( | |
[parameter(Mandatory=$true)] | |
[ValidatePattern('\.rptproj$')] | |
[ValidateScript({ Test-Path -PathType Leaf -Path $_ })] | |
[string] | |
$Path, | |
[parameter( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Backup all dbs in separate files | |
# adapted from | |
# http://www.usercore.com/backup-all-mysql-databases-as-seperate-sql-files/ | |
# use mysqldump5 for MacPorts, mysqldump otherwise | |
user='root' | |
password='password' | |
to='/path/to/backup/folder' # without final / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to backup all mysql tables as separate files | |
# | |
# $BACKUP_PATH/<date>/<db_name>/<host>_<table_name>.gz | |
# MySQL settings | |
MYSQL_USER="root" | |
MYSQL_PASS="" | |
MYSQL_HOST="localhost" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select asciiname,latitude,longitude, acos(SIN( PI()* 40.7383040 /180 )*SIN( PI()*latitude/180 ) | |
)+(cos(PI()* 40.7383040 /180)*COS( PI()*latitude/180) *COS(PI()*longitude/180-PI()* -73.99319 /180) | |
)* 3963.191 AS distance | |
FROM allcountries | |
WHERE 1=1 | |
AND 3963.191 * ACOS( (SIN(PI()* 40.7383040 /180)*SIN(PI() * latitude/180)) + | |
(COS(PI()* 40.7383040 /180)*cos(PI()*latitude/180)*COS(PI() * longitude/180-PI()* -73.99319 /180)) | |
) < = 1.5 | |
ORDER BY 3963.191 * ACOS( | |
(SIN(PI()* 40.7383040 /180)*SIN(PI()*latitude/180)) + |