borrowed from : https://gist.github.com/springmeyer/3427021
prior to running thr script you will need to allow epl6 repos with:
# enable EPEL6 by changing enabled=0 -> enabled=1
sudo vim /etc/yum.repos.d/epel.repo
| from rmwb w/ no compat: (working) | |
| "user-agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" | |
| from rmwb w/ compat: ( not working) | |
| "user-agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; BRI/2)" | |
| from spencer w/ compat: (working) | |
| "user-agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; ASU2JS)" |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>A Simple Map</title> | |
| <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
| <script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.1/mapbox.js'></script> | |
| <link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.1/mapbox.css' rel='stylesheet' /> |
| private void enableHTML5AppCache() { | |
| webView.getSettings().setDomStorageEnabled(true); | |
| // Set cache size to 8 mb by default. should be more than enough | |
| webView.getSettings().setAppCacheMaxSize(1024*1024*8); | |
| // This next one is crazy. It's the DEFAULT location for your app's cache | |
| // But it didn't work for me without this line | |
| webView.getSettings().setAppCachePath("/data/data/"+ getPackageName() +"/cache"); |
| packages: | |
| yum: | |
| gcc-c++: [] | |
| make: [] | |
| sources: | |
| /home/ec2-user: http://download.redis.io/releases/redis-2.8.4.tar.gz | |
| commands: | |
| redis_build: | |
| command: make | |
| cwd: /home/ec2-user/redis-2.8.4 |
borrowed from : https://gist.github.com/springmeyer/3427021
prior to running thr script you will need to allow epl6 repos with:
# enable EPEL6 by changing enabled=0 -> enabled=1
sudo vim /etc/yum.repos.d/epel.repo
| # usage: curl https://[gist-raw-url] | bash | |
| sudo yum -y update; | |
| sudo yum -y upgrade; | |
| sudo yum -y install git nodejs npm postgresql-devel --enablerepo=epel | |
| git clone https://github.com/mapnik/node-mapnik.git | |
| cd node-mapnik | |
| git checkout 1.4.1 |
| #!/usr/local/bin/python | |
| import sys | |
| import sqlparse | |
| # usage cat test.sql | ./format_sql.py > test2.sql | |
| def main(argv): | |
| sql = sys.stdin.read().replace('\n', '') | |
| print sqlparse.format(sql, reindent=True, keyword_case='upper') |
| CREATE FUNCTION stage_files(text) RETURNS text AS $$ | |
| DECLARE | |
| path ALIAS FOR $1; | |
| BEGIN | |
| RETURN path; | |
| END; | |
| $$ LANGUAGE plpgsql; |
| #credits to: http://www.lecloud.net/post/61401763496/install-update-to-python-2-7-and-latest-pip-on-ec2 | |
| # install build tools | |
| sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y | |
| # install python 2.7 and change default python symlink | |
| sudo yum install python27-devel -y | |
| sudo rm /usr/bin/python | |
| sudo ln -s /usr/bin/python2.7 /usr/bin/python |
| violations = { | |
| 'VARIABLES': { | |
| 'CompanyPlotNumber': [0], | |
| 'DisturbanceYear': [3], | |
| 'DisturbanceDay': [5], | |
| 'DisturbanceNumber': [1], | |
| 'DisturbanceComment': [6], | |
| 'DisturbanceCode': [2], | |
| 'DisturbanceMonth': [4], | |
| 'CompoundFKey': [7], |