Skip to content

Instantly share code, notes, and snippets.

View keum's full-sized avatar

Peter Keum keum

  • King County - Wastewater Treatment Division
  • Seattle, WA
  • 08:30 (UTC -07:00)
View GitHub Profile
@keum
keum / How to: geojson-conversion.sh
Last active December 31, 2015 04:59 — forked from benbalter/geojson-conversion.sh
How to: Bulk conversion Shape to Geojson
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
@keum
keum / How to: Paul's gist on ogr_geojson
Last active January 1, 2016 19:29 — forked from mccombsp-kingco/gist:8185605
How To: Gdal using ogr for geojson
Install gdal http://giscollective.org/installing-gdal-mac/
use github http://www.thinkful.com/learn/a-guide-to-using-github-pages/start/existing-project/user-page/
git add .
551 git commit -a -m "testing GeoJSON format"
552 git config --global user.name "mccombsp-kingco"
553 git config --global user.emal [email protected]
554 git commit --amend --reset-author
555 git push
@keum
keum / postgres windows installation
Last active August 29, 2015 13:57
Installing postgres in windows machine
Installing postgres in windows box -
Installed on to this windows box: itgisqldev01.dnrp.kingcounty.lcl
1. This is to connect PostGIS connection from QGIS 2.+
Name: ITGISQLDEV01
Host: itgisqldev01.kingcounty.lcl
Port: 5432
Database: kcgis

Objects

To create a new object, use the new keyword followed by a call to a constructor function. Javascript provides the Object() constructor out-of-the-box:

var toilet = new Object();

Properties

Once you have an object, you can set and get properties on it, like this:

@keum
keum / How to: Resolving GitHub Merge Issue-20130910-merge-commit.md
Last active November 7, 2015 05:35 — forked from joallard/20130910-merge-commit.md
How to: GitHub - Resolving merge issue

So, you've merged the master branch with itself, and you ended up with a merge commit nobody wanted.

The problem

Let me tell you a little story...

John and Pete are working together on a repo.

$ git log --graph --pretty=oneline --abbrev-commit  # an alias I have under 'git lol', but 'gitk' does just fine
* 812492b (master, origin/master, origin/HEAD) Add stuff
@keum
keum / How to: Adding Project to GitHub Master
Last active November 7, 2015 05:33
How to: Adding Existing Project into GitHub Page using CLI
Summary from this site: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
Easy definition
Local Repository = your laptop folder
Remote Repository = your GitHub account website
Origin = your local directory in your laptop
Master = your copy existing in GitHub site.
Step 1:
@keum
keum / Phantom Vision 2
Created February 11, 2015 20:55
Various Notes and Tips & Ideas on Phantom Vision 2
http://www.pattayadays.com/2014/03/naza-mode-on-the-phantom-2-vision/
@keum
keum / pi-file
Created May 15, 2015 16:27
etc-network-interfaces file
auto lo
iface lo inet loopback
iface eth0 inet auto
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp