- 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) { |
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
// async | |
var async = require('async'); | |
async.parallel([ | |
function(callback) { | |
Check.find({ status: 1 }).exec(callback); | |
}, | |
function(callback) { | |
Check.find({ status: 2 }).exec(callback); | |
} |
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
# reg-exp | |
import re | |
# use pyserial | |
import serial | |
from time import sleep | |
def checkOK(): | |
isOK = False | |
lines = ser.readlines() | |
for line in lines: |
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
<VirtualHost *:80> | |
ServerName noomz.in.th | |
DocumentRoot /var/www/noomz.in.th/html/ | |
<Directory /var/www/noomz.in.th/html/> | |
Options -Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> |
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
# Install apache2 via tasksel | |
sudo tasksel install lamp-server | |
# Add user | |
adduser noomz | |
# Add user to admin (sudo-able) group | |
usermod -a -G adm,sudo,www-data noomz | |
# Logout from root and login as user we have just created |
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
set shiftwidth=2 | |
set tabstop=2 | |
set expandtab | |
set nu | |
set ai | |
set smartindent | |
map! <F2> <C-x><C-p> | |
if has("autocmd") | |
" Drupal *.module and *.install files. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>x</title> | |
<link rel="stylesheet" type="text/css" href="main.css"> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> | |
<script type="text/javascript" src="main.js"></script> | |
</head> | |
<body> | |
<div id="x"> |
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
as=document.getElementsByTagName('a');for(i in as){if(as[i] && as[i].href && as[i].href.match(/tua\.sarocha$/)){as[i].remove();}} |
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
SetEnvIf Request_URI "^.*/([^/]*)$" FILENAME=$1 | |
Header set "Content-disposition" "attachment; filename=%{FILENAME}e" | |
UnsetEnv FILENAME |