More info in the blog post.
This file contains hidden or 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
| --- /usr/bin/gdal2tiles.py 2014-04-05 23:21:17.000000000 +0900 | |
| +++ /home/kudarisenmon/bin/gdal2tiles.py 2016-07-09 18:08:34.012957232 +0900 | |
| @@ -783,7 +783,7 @@ | |
| self.out_srs = osr.SpatialReference() | |
| if self.options.profile == 'mercator': | |
| - self.out_srs.ImportFromEPSG(900913) | |
| + self.out_srs.ImportFromEPSG(3857) | |
| elif self.options.profile == 'geodetic': | |
| self.out_srs.ImportFromEPSG(4326) |
This file contains hidden or 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
| # Weather! | |
| # uses https://github.com/alexreisner/geocoder | |
| # and https://github.com/robmathers/WhereAmI | |
| function wthr | |
| set LOC (whereami) | |
| set LAT (echo $LOC | cut -d" " -f2) | |
| set LON (echo $LOC | cut -d" " -f4) | |
| set CITY (geocode -s nominatim "$LAT,$LON" | grep -Eo '^City(.+)' | cut -d: -f2 | xargs | tr ' ' '-') | |
| curl -4 http://wttr\.in/$CITY | |
| end |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
This file contains hidden or 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
| var Bar1 = base => class extends base { | |
| componentWillMount(){ | |
| super.componentWillMount(); | |
| console.log('Bar1'); | |
| } | |
| }; | |
| var Bar2 = base => class extends base { | |
| componentWillMount(){ | |
| super.componentWillMount(); |
This file contains hidden or 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
| //------------------------------------------ | |
| //Compact bitmap datastructure | |
| //Memory efficient array of bool flags | |
| var Bitmap = function(size){ | |
| this._cols = 8; | |
| this._shift = 3; | |
| this._rows = (size>>this._shift)+1; | |
| this._buf = new ArrayBuffer(this._rows); | |
| this._bin = new Uint8Array(this._buf); | |
| }; |
by alexander white ©
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.