This file contains 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
<?php | |
namespace Application\Backend\Models; | |
/** | |
* | |
*/ | |
class ZipCoordinates extends \Phalcon\Mvc\Model | |
{ | |
/** |
This file contains 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
SET NAMES 'utf8'; | |
BEGIN; | |
/* | |
* Table structure for table 'geodb_type_names' | |
*/ | |
create table geodb_type_names ( | |
type_id integer not null, | |
type_locale varchar(5) not null, |
This file contains 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
SET NAMES 'utf8'; | |
BEGIN; | |
/* | |
* Table structure for table 'geodb_type_names' | |
*/ | |
create table geodb_type_names ( | |
type_id integer not null, | |
type_locale varchar(5) not null, |
This file contains 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 one test zip */ | |
SELECT zc_id, zc_location_name, zc_lat, zc_lon | |
FROM zip_coordinates | |
WHERE zc_zip = '13187'; | |
/* calculate with the found data from above the zip in the radius < 20km */ | |
SELECT | |
zc_zip, | |
zc_location_name, | |
ACOS( |
This file contains 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
/* http://opengeodb.org/wiki/OpenGeoDB_-_Umkreissuche */ | |
/* create zip table */ | |
CREATE TABLE `zip_coordinates` ( | |
zc_id INT NOT NULL auto_increment PRIMARY KEY, | |
zc_loc_id INT NOT NULL , | |
zc_zip VARCHAR( 10 ) NOT NULL , | |
zc_location_name VARCHAR( 255 ) NOT NULL , | |
zc_lat DOUBLE NOT NULL , | |
zc_lon DOUBLE NOT NULL |
This file contains 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 | |
# - INSTALL instructions: | |
# mkdir /your/preferred/path/opengeodb | |
# cd /your/preferred/path/opengeodb | |
# - copy this script to install_opengeodb.sh | |
# - make script executable: | |
# chmod +x install_opengeodb.sh | |
# - edit you mysql credentials | |
# |
This file contains 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
du -hsx * | sort -rh | head -10 |
This file contains 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
# ************************************************************ | |
# Sequel Pro SQL dump | |
# Version 3408 | |
# | |
# http://www.sequelpro.com/ | |
# http://code.google.com/p/sequel-pro/ | |
# | |
# Host: 127.0.0.1 (MySQL 5.5.27-1~dotdeb.0) | |
# Datenbank: mail | |
# Erstellungsdauer: 2012-09-26 19:30:53 +0000 |
This file contains 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 | |
read -p "please provide a name for a new user:" name | |
if [ "$name" == "" ]; then | |
echo "You did not entered a user name, so no user will be added." | |
exit; | |
fi | |
USER=$name | |
HOME=/home/$USER |
This file contains 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
# add database 'redmine' and user 'redmine' to mysql | |
aptitude -y install ruby libruby libopenssl-ruby libpgsql-ruby rubygems apache2 libapache2-mod-passenger | |
aptitude -y install subversion | |
aptitude -y install install libmysql-ruby libmysqlclient-dev | |
aptitude install libpq-dev libsqlite3-dev libmagick9-dev graphicsmagick-libmagick-dev-compat | |
cd /var/www | |
svn co http://redmine.rubyforge.org/svn/branches/2.0-stable redmine | |
cd redmine | |
cp config/database.yml.example config/database.yml | |
vim config/database.yml |
NewerOlder