Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
| // custom mapbopx-gl-draw mode that modifies draw_line_string | |
| // shows a center point, radius line, and circle polygon while drawing | |
| // forces draw.create on creation of second vertex | |
| import MapboxDraw from 'mapbox-gl-draw'; | |
| import numeral from 'numeral'; | |
| import lineDistance from 'npm:@turf/line-distance'; | |
| const RadiusMode = MapboxDraw.modes.draw_line_string; |
| pop.var <- function(x) var(x) * (length(x)-1) / length(x) | |
| pop.sd <- function(x) sqrt(pop.var(x)) |
| <? | |
| ///////////////////// | |
| // slack2html | |
| // by @levelsio | |
| ///////////////////// | |
| // | |
| ///////////////////// | |
| // WHAT DOES THIS DO? | |
| ///////////////////// | |
| // |
| MIT License | |
| Copyright (c) 2014 Piotr Kuczynski | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWAR |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
| library(OIdata) | |
| library(RColorBrewer) | |
| library(classInt) | |
| # load state data from OIdata package: | |
| data(state) | |
| # set constants: | |
| nclr <- 8 # number of bins | |
| min <- 0 # theoretical minimum |
| rpm -Uvh http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm | |
| yum install postgresql93 postgresql93-server postgresql93-contrib postgresql93-devel postgis2_93 postgis2_93-utils | |
| #Configure PostgreSQL | |
| chkconfig postgresql-9.3 on | |
| service postgresql-9.3 initdb | |
| service postgresql-9.3 start | |
| # Create PostGIS template |
| # run using ```rvm jruby-1.6.7 do jruby "-J-Xmx2000m" "--1.9" tej.rb``` | |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'csv' | |
| f = File.open("/tmp/preview.html") | |
| doc = Nokogiri::HTML(f) | |
| csv = CSV.open("/tmp/output.csv", 'w',{:col_sep => ",", :quote_char => '\'', :force_quotes => true}) |
| /* | |
| * A function that converts a PostGIS query into a GeoJSON object. | |
| * Copyright (C) 2012 Samuel Giles <sam@sam-giles.co.uk> | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, |