Skip to content

Instantly share code, notes, and snippets.

@curtkim
curtkim / a.groovy
Last active December 9, 2015 05:25
gradle
task getDeps(type: Copy) {
from sourceSets.main.runtimeClasspath
into 'lib/'
}
<!DOCTYPE html>
<html>
<head>
<title>Daum Image Tile by Openlayers3</title>
<link rel="stylesheet" href="http://openlayers.org/en/v3.16.0/css/ol.css" type="text/css">
<script src="http://openlayers.org/en/v3.16.0/build/ol.js"></script>
<style>
body {margin: 0; padding: 0}
</style>
</head>
1. Geometry를 다룰줄 안다
- Java Topology suite : https://github.com/locationtech/jts
- tutorial : http://docs.geotools.org/latest/userguide/library/jts/index.html
2. 저장소(DB)에 저장한다
- postgis : http://postgis.net/
- tutorial : http://workshops.boundlessgeo.com/postgis-intro/
3. 화면에 표시한다.
- desktop : http://www.qgis.org/ko/site/
db.gates.insert(
{
boundary : { type: "Polygon", coordinates: [ [ [ 127, 37] , [127.1 , 37] , [127 , 37.1] , [ 127, 37] ] ] },
gate : {type: "Point", coordinates:[127, 37] }
}
)
db.gates.createIndex( { boundary : "2dsphere" } )
db.gates.find( { boundary :
{ $geoWithin :
import com.mashape.unirest.http.HttpResponse
import com.mashape.unirest.http.JsonNode
import com.mashape.unirest.http.Unirest
import com.mashape.unirest.http.async.Callback
import com.mashape.unirest.http.exceptions.UnirestException
import java.util.concurrent.CountDownLatch
import java.util.concurrent.Future
int count = 100
conda env create --file enviornment.yml
conda activate p3
conda install ipython
conda env export > environment2.yml
conda deactivate
@curtkim
curtkim / a.sql
Created March 22, 2018 01:00
greenplum sql
SELECT
relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables
where schemaname = '' and relname = ''
@curtkim
curtkim / a
Created July 31, 2018 04:36
gradle
// downloaded jar
compile fileTree(dir: 'ext', include: '*.jar')
// sibling project
testCompile project(':stream-test')
conda create -n p2 python=2.7
conda activate p2
pip install --upgrade pip setuptools
pip install --upgrade python-openstackclient
{
"bip": "10.252.0.1/16"
}