Skip to content

Instantly share code, notes, and snippets.

@kgjenkins
kgjenkins / carson-projection.png
Last active July 18, 2016 21:48
Carson projection in CartoDB PostGIS
carson-projection.png
@samuelestabrook
samuelestabrook / Qt_fix_QGIS.md
Last active August 29, 2015 14:24
Fix Qt for Homebrew QGIS install

Fix Qt for Homebrew QGIS install

Go to terminal and roll back the Qt installation through GitHub

$ brew uninstall qt
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew/8dd3478131b232553f4c0cab197f8443a0a559a6/Library/Formula/qt.rb
@coolaj86
coolaj86 / github-pages-https-lets-encrypt.md
Last active November 16, 2021 22:36
Github Pages: Let's Encrypt!
@mangecoeur
mangecoeur / description.md
Last active March 30, 2021 21:34
Pandas PostgresSQL support for loading to DB using fast COPY FROM method

This small subclass of the Pandas sqlalchemy-based SQL support for reading/storing tables uses the Postgres-specific "COPY FROM" method to insert large amounts of data to the database. It is much faster that using INSERT. To acheive this, the table is created in the normal way using sqlalchemy but no data is inserted. Instead the data is saved to a temporary CSV file (using Pandas' mature CSV support) then read back to Postgres using Psychopg2 support for COPY FROM STDIN.

@sgillies
sgillies / README.md
Last active April 6, 2020 12:53
Get raster value at a point using a tiny window

A Rasterio dataset's index() method gives you the row, col index of the pixel containing the point x, y (in the dataset's CRS units).

Define a 1x1 pixel read window starting at that index (see the tiny_window() function below) and use it to read an ndarray. The one in this case has shape (3, 1, 1): 3 bands, 1 row, and 1 column. The values of the 3 bands at the point x, y for this case are 28, 29, and 27.

@dalekunce
dalekunce / mac_gis_setup.md
Last active July 29, 2023 22:18
Yosemite GIS Machine Setup

Mac OS X GIS Setup

OS X Preferences


# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
import Control.Monad
import Control.Concurrent
import Data.Int
import System.Environment
sendSidewards :: Chan Int -> Chan Int -> IO ()
sendSidewards from to = do
n <- readChan from
writeChan to n
sendSidewards from to
@jkbrzt
jkbrzt / pyc
Last active June 6, 2023 14:59
Delete Python's compiled *.pyc files like a pro
#!/bin/sh
#
# Delete Python's compiled *.pyc and __pycache__ files like a pro
# https://gist.github.com/jakubroztocil/7892597
#
# Usage:
# Delele *.pyc and __pycache__ files recursively in the current directory:
# $ pyc
#
# The same, but under /path:
@z3cka
z3cka / Vagrantfile
Created December 5, 2013 17:44
Sample base Vagrantfile with 2GB of ram and 2 cpus :-) Initialize with: vagrant init precise32 http://files.vagrantup.com/precise32.box
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise32"
@konklone
konklone / ssl.rules
Last active May 19, 2024 18:02
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {