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 | |
# vars | |
PHP_VERSION="5.3.6" | |
NGINX_VERSION="1.0.4" | |
MONGO_VERSION="1.8.1" | |
MEMCACHED_VERSION="1.4.5" | |
DIRECTORY=$(cd `dirname $0` && pwd) | |
PHP_DIR=$DIRECTORY/lib/php/$PHP_VERSION/ |
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
// derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm | |
function map() { | |
emit(1, // Or put a GROUP BY key here | |
{sum: this.value, // the field you want stats for | |
min: this.value, | |
max: this.value, | |
count:1, | |
diff: 0, // M2,n: sum((val-mean)^2) | |
}); |
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
#found this somewhere long ago | |
#add to your ~/.profile | |
#colors | |
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` |
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 | |
dir="/var/www/geoip"; | |
# change to dir | |
cd ${dir} | |
#download the dat file from maxmind | |
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
#unzip and overwrite the .dat file |
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 | |
/* | |
* @author Andrew Van Tassel | |
* @email [email protected] | |
* @notes Create a data directory, Add tac param to start from end of file | |
* @todo Add paging and offset param | |
*/ | |
$_GET['limit']=isset($_GET['limit']) && is_numeric($_GET['limit'])?(int)$_GET['limit']:50; | |
function getFieldKeys($output){ |
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
<!DOCTYPE html> | |
<html> | |
<!-- ZevRoss Spatial Analysis, www.zevross.com --> | |
<!-- A note: if you're not seeing the elements in the custom | |
infowindow look at the cartodb dashboard and make sure they're | |
turned on | |
--> |
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
"w3w": { | |
"name": "w3w", | |
"connector": "rest", | |
"operations": [ | |
{ | |
"template": { | |
"method": "GET", | |
"url": "http://api.what3words.com/position/", | |
"headers": { | |
"accepts": "application/json", |
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
"geo": { | |
"name": "geo", | |
"connector": "rest", | |
"operations": [ | |
{ | |
"template": { | |
"method": "GET", | |
"url": "http://maps.googleapis.com/maps/api/geocode/{format=json}", | |
"headers": { | |
"accepts": "application/json", |
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 | |
################################################################################ | |
# | |
# Delete least used files | |
# | |
################################################################################ | |
PROGNAME=${0##*/} | |
PROGDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
VERSION="0.1" |
OlderNewer