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 | |
# | |
# These lines installing the complete software for a nginx - php5-fpm - mysql machine | |
# This script runs on: | |
# - Hetzner Root EX4 (Debian6 minimal installation) | |
# - Strato Root Server Linux Level 3 (v1209.1.42) Debian 6.0 64bit | |
# Installation: | |
# copy this lines to /root/install.sh | |
# if vim is not already installed |
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/sh | |
### BEGIN INIT INFO | |
# Provides: spawn-fcgi | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |
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 "do you want to install release or development version of phalcon? [default=release] " typeq | |
if [ "$typeq" == "" ]; then | |
TYPE="release" | |
else | |
TYPE=$typeq | |
fi |
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 |
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
# ************************************************************ | |
# 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
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
#!/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
/* 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
/* 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( |
OlderNewer