- http://terraformer.io/
- contains
- within
- https://github.com/lsm/WTGeo
- Convert decimal degrees to deg/min/sec format
- Calculates geodetic distance between two points
- https://github.com/netshade/spatial_query
- polygon
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
'use strict'; | |
var when = require('when'); | |
var check = function(value) { | |
// return promise here and then ready to run next expression without waiting. | |
return when.promise(function(resolve, reject) { | |
// simulate delay task. | |
setTimeout(function() { | |
if (value === 0) { |
GIS datasource
- http://www.naturalearthdata.com/
- http://gis.mot.go.th/meta_mng/link_kmz.jsp
- http://www.geonames.org/
Thailand
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
# 1. Download all cert files | |
# 2. Run command, replace www_example_com.crt with your domain cert | |
cat www_example_com.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt AddTrustExternalCARoot.crt > ssl-bundle.crt | |
# 3. Upload ssl-bundle.crt and www_example_com.key to your server. | |
# 4. Config nginx | |
# ------------------------ | |
# listen 443; | |
# | |
# ssl on; |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
c := fanIn(boring("boring Joe!"), boring("boring Ann!")) |
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/env bash | |
# redis-server | |
REDIS_FOUND=$(ps aux | grep redis) | |
if [ ${#REDIS_FOUND[@]} -eq 1 ] | |
then | |
echo "Neet to start redis-server" | |
cd /tmp/ && redis-server& | |
fi |
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
diff -ubr php-5.3.10/ext/dom/documenttype.c ../php-5.3.10/ext/dom/documenttype.c | |
--- php-5.3.10/ext/dom/documenttype.c 2012-01-01 20:15:04.000000000 +0700 | |
+++ ../php-5.3.10/ext/dom/documenttype.c 2015-06-29 14:31:37.945789850 +0700 | |
@@ -205,7 +205,11 @@ | |
if (buff != NULL) { | |
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL); | |
xmlOutputBufferFlush(buff); | |
+#ifdef LIBXML2_NEW_BUFFER | |
+ ZVAL_STRINGL(*retval, xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff), 1); | |
+#else |
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
diff --git a/src/options.sh b/src/options.sh | |
index a172526..698728c 100755 | |
--- a/src/options.sh | |
+++ b/src/options.sh | |
@@ -16,6 +16,7 @@ vminor=$3 | |
vpatch=$4 | |
configoptions="\ | |
+--with-libdir=/lib/x86_64-linux-gnu \ | |
--disable-short-tags \ |
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
console.log('Ex 1: Simple'); | |
draw(pyramid, { height: 5, fill: true }); | |
console.log('Ex 2: Simple custom char'); | |
draw(pyramid, { height: 5, fill: true, fillChar: '#' }); | |
console.log('Ex 3: Apply filter'); | |
draw(pyramid, { height: 5, fill: true, filters: [ filterBlock ] }); | |
console.log('Ex 4: Apply more filters'); | |
draw(pyramid, { height: 5, fill: true, filters: [ filterBlock, filterShadow ] }); | |
console.log('Ex 5: Simple custom char (w/ border)'); | |
draw(pyramid, { height: 5, fill: false }); |
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
<?php | |
$youtube_url = 'https://www.youtube.com/watch?v=UeR_jEx6Pzs'; | |
// or | |
$youtube_url = '<iframe width="560" height="315" src="https://www.youtube.com/embed/UeR_jEx6Pzs" frameborder="0" allowfullscreen></iframe>'; | |
if ($youtube_url) { | |
if (preg_match('/iframe/', $youtube_url)) { | |
$iframe_url = preg_replace('/width=[\"\'].*?[\"\']/', 'width="100%"', $youtube_url); | |
$iframe_url = preg_replace('/height=[\"\'].*?[\"\']/', 'height="100%"', $iframe_url); | |
$fixed = $iframe_url; | |
} |