Skip to content

Instantly share code, notes, and snippets.

@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active November 17, 2024 14:27
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@bertt
bertt / convert_4326_3857
Last active July 21, 2023 11:10
Convert from Longitude/Latitude (4326) to 3857 (Spherical Mercator)
public static double[] ToSphericalMercatorFromWgs84(double Longitude, double Latitude)
{
var x = Longitude * 20037508.34 / 180;
var y = Math.Log(Math.Tan((90 + Latitude) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return new double[] { x, y };
}
public static double[] ToWgs84FromSphericalMercator(double x, double y)
{
@stucka
stucka / python startup.txt
Last active May 4, 2024 23:40
Set up a new Python
My Python initial setup:
python -m pip install --upgrade pip
Is it sqwaking about managed configuration? If you're on Unix and feeling dumb:
cd /.config
mkdir pip
cd pip
nano pip.conf
...
Add this:
@kelvinn
kelvinn / InstallPythonGDAL.md
Last active July 28, 2024 14:08
Installing GDAL (Python 3.6) on Mac OS X

How-To: Install GDAL Python Bindings

I've found two ways to install the GDAL Python bindings on Mac.

Via GDAL Framework / QGIS

First, you can install the GDAL Framework via QGIS (or get it directly), and then do...

@mbostock
mbostock / .block
Last active November 13, 2016 21:45
U.S. Atlas, Redux [UNLISTED]
license: bsd-3-clause
@mbostock
mbostock / .gitignore
Last active September 13, 2019 01:32
Force GIF
*.png
*.gif
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active September 11, 2024 08:13
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.
@Robinlovelace
Robinlovelace / mapshaper.R
Created January 7, 2016 16:58
Demonstrates the use of mapshaper called from R to simplify spatial objects: https://github.com/ropensci/stplanr
# # # # # # # # # # # # # # # # # # # #
# Simplify sp objects w. mapshaper #
# Needs https://nodejs.org installed #
# Tested on Windows and Linux #
# # # # # # # # # # # # # # # # # # # #
# # # # # #
# R setup #
# # # # # #
@mmohiudd
mmohiudd / geo_update_trigger.sql
Created September 30, 2015 17:03
Update geometry and geography data with a trigger for PostgreSQL(PostGIS)
DROP TABLE IF EXISTS test_table;
CREATE TABLE test_table(
id bigserial NOT NULL,
latitude double precision,
longitude double precision,
geom geometry,
geog geography,
updated_ts double precision,
CONSTRAINT test_table_unique_key UNIQUE (id)
);