Skip to content

Instantly share code, notes, and snippets.

View palmerj's full-sized avatar

Jeremy Palmer palmerj

  • Toitū The Whenua Land Information New Zealand
  • Wellington, New Zealand
View GitHub Profile
@palmerj
palmerj / gdal_py_install.sh
Created March 3, 2020 08:52
Install GDAL python binding using MacOSX framework
wget https://files.pythonhosted.org/packages/dc/d5/90339b48bdcabc76124eaa058a32d796963a05624eb418ed5ea5af7db9fa/GDAL-2.4.2.tar.gz
tar -xpf GDAL-2.4.2.tar.gz
cd GDAL-2.4.2
python setup.py build_ext -I/Library/Frameworks/GDAL.framework/Versions/2.4/Headers -L/Library/Frameworks/GDAL.framework/Versions/2.4/unix/lib --gdal-config /Library/Frameworks/GDAL.framework/Versions/2.4/unix/bin/gdal-config
python setup.py build
python setup.py install
@palmerj
palmerj / NZTM2000_EPSG2193.png
Last active June 2, 2020 02:33
NZTM2000 EPSG:2193
NZTM2000_EPSG2193.png
#!/bin/bash
FILE_IN=
file_name=$( basename $FILE_IN | sed 's/.tif//' )
output_dir=
div
function gdal_extent_gdalwarp_te() {
#!/bin/bash
xmlfile=/gebco_template.xml
base_file=$1
export_dir=
export_png=
export_xml=
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map background-color="#2a383e" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<Style comp-op="color-dodge" filter-mode="first" name="gebco2019webmercator2">
<Rule>
<RasterSymbolizer default-color="rgba(0, 0, 0, 0)" default-mode="linear" scaling="bilinear">
<stop color="#222222" value="0" />
<stop color="#ebebeb" value="255" />
</RasterSymbolizer>
<?xml version="1.0"?>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<ows:ServiceIdentification>
<ows:Title>National Base Mapping Service (LINZ)</ows:Title>
<ows:Abstract>National Mapping Service provided by Land Information New Zealand</ows:Abstract>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
<ows:Fees>There are no fees associated with data access via the web interface, API or Web Services.</ows:Fees>
<ows:AccessConstraints>LINZ Data Service Customers complete a self registration process where
they accept site terms. Access to the data is subject to the terms of
@palmerj
palmerj / M30.md
Last active November 16, 2024 19:54
8BitDo M30 2.4G Gamepad for Genesis Mini/Mega Drive Mini

Collection of FAQs and Configs for the 8BitDo M30 2.4G

image

Can I map the Dpad on this controller? Can I also map and swap the A/B/X/Y buttons on this controller?

Yes, you can when wired via USB. The default mode of the DPad on this controller is as left analogue stick. You can also:

  • LEFT + Select : set Dpad as left analogue stick.
  • Up + Select : reset Dpad.
  • Right + Select : set Dpad as right analogue stick.
@palmerj
palmerj / mk2p.md
Last active March 17, 2025 07:24
MK2+ (Mortal Kombat 2 Plus beta II) Moves and Secrets

Player Moves

These are moves for MK2+ Beta II

Controls Key

Forward: F
Down: D
Back: B
Up: U

@palmerj
palmerj / pgtap.rb
Created January 19, 2023 12:47
PgTAP
class Pgtap < Formula
desc "Unit testing framework for PostgreSQL"
homepage "http://pgtap.org/"
url "https://api.pgxn.org/dist/pgtap/1.2.0/pgtap-1.2.0.zip"
sha256 "1b574735576f1cd8c6bbbfc91e0435cb067d7a09c4319d61826960aa3911d780"
revision 1
head "https://github.com/theory/pgtap.git"
bottle do
@palmerj
palmerj / metal_hud.md
Created April 14, 2023 21:50
Metal Performance HUD - display FPS

Requires MacOS Venture >=13

Enable HUD

/bin/launchctl setenv MTL_HUD_ENABLED 1

Disable HUD:

/bin/launchctl setenv MTL_HUD_ENABLED 0