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
-- change 9 to whatever the max zoom level you want in your MBTiles | |
DELETE FROM tiles_data WHERE | |
tile_data_id IN (SELECT tile_data_id FROM tiles_shallow WHERE zoom_level > 9) AND | |
tile_data_id NOT IN (SELECT tile_data_id FROM tiles_shallow WHERE zoom_level <= 9); | |
DELETE FROM tiles_shallow WHERE zoom_level > 9; | |
UPDATE metadata SET value = '9' WHERE name = 'maxzoom'; |
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
yum -y install bzip2-devel libtiff-devel giflib-devel ghostscript-devel libwmf-devel jasper-devel libtool-ltdl-devel libXext-devel libXt-devel librsvg2-devel OpenEXR-devel libwebp-devel | |
rpm -ivh http://vault.centos.org/centos/7/updates/Source/SPackages/ImageMagick-6.7.8.9-15.el7_2.src.rpm | |
sed -i '/BuildRequires:\tghostscript-devel/a BuildRequires:\tlibwebp-devel' /root/rpmbuild/SPECS/ImageMagick.spec | |
sed -i '/Requires: pkgconfig/a Requires: libwebp' /root/rpmbuild/SPECS/ImageMagick.spec | |
rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec | |
# actual install | |
rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-6.7.8.9-15.el7.centos.x86_64.rpm |
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
### No longer needed as of nginx-1.13.6-1.el7_4.ngx.x86_64.rpm from nginx.org | |
### it was compiled against OpenSSL 1.0.2 from CentoOS 7.4 so it supports ALPN (HTTP2 works) | |
yum -y groupinstall 'Development Tools' | |
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools | |
OPENSSL="openssl-1.0.2l" | |
NGINX_VERSION="1.13.5-1" | |
NJS_VERSION="1.13.5.0.1.13-1" |
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
07-23 20:34:33.725 1257-1758/? D/PowerManagerNotifier﹕ onUserActivity: event=2, uid=1000 | |
07-23 20:34:33.731 1257-1758/? E/qdlights﹕ set_light_buttons enter: | |
07-23 20:34:33.732 1257-1758/? E/qdlights﹕ set_light_buttons done: | |
07-23 20:34:33.810 2308-2308/? I/Timeline﹕ Timeline: Activity_launch_request id:com.google.samples.apps.cardboarddemo time:170797 | |
07-23 20:34:33.812 1257-2114/? V/ActivityManager﹕ notify app switch for new activity com.google.samples.apps.cardboarddemo Where 1 | |
07-23 20:34:33.813 1257-2114/? I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.google.samples.apps.cardboarddemo/com.google.vr.cardboard.paperscope.carton.Home2D (has extras)} from uid 10109 on display 0 | |
07-23 20:34:33.814 1257-2114/? I/Configuration﹕ Configuration getConfigurationFromSysProp name= persist.sys.font_scale value= | |
07-23 20:34:33.814 1257-2114/? I/Configuration﹕ Configuration getConfigurationFromSysProp name= persist.sys.fon |
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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
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
public Bitmap invert(Bitmap src) | |
{ | |
int height = src.getHeight(); | |
int width = src.getWidth(); | |
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); | |
Canvas canvas = new Canvas(bitmap); | |
Paint paint = new Paint(); | |
ColorMatrix matrixGrayscale = new ColorMatrix(); |
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
import java.awt.Color; | |
import java.awt.color.ColorSpace; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import javax.imageio.ImageIO; | |
// WARNING: DIRTY CODE | |
public class msol2png { |