Skip to content

Instantly share code, notes, and snippets.

@wildintellect
wildintellect / xarray2gpq.ipynb
Created August 9, 2023 00:34
ATL03 to Geoparquet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wildintellect
wildintellect / buildliveinchroot.sh
Created May 1, 2012 23:31
OSGeo Live chroot build
#LiveCD on the commandline
#https://help.ubuntu.com/community/LiveCDCustomization
DIR=`dirname ${0}`
VERSION=`cat "$DIR"/../VERSION.txt`
PACKAGE_NAME="osgeo-live"
ISO_NAME="${PACKAGE_NAME}-${VERSION}"
sudo apt-get install squashfs-tools genisoimage
#TODO add wget to grab a fresh image, optional
@wildintellect
wildintellect / Dockerfile
Created January 7, 2022 00:32
Untwine Docker Image VS Code
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/python-3-miniconda/.devcontainer/base.Dockerfile
FROM mcr.microsoft.com/vscode/devcontainers/miniconda:0-3
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# Copy environment.yml (if found) to a temp location so we update the environment. Also
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
@wildintellect
wildintellect / spyder3.desktop
Created October 10, 2019 17:17
Anaconda Spyder3 Desktop Launcher Linux
[Desktop Entry]
Name=Spyder3
Exec=/home/<username>/anaconda3/bin/spyder
Icon=/usr/share/app-install/icons/spyder3.png
Type=Application
Terminal=false
Categories=Office;Development;
MimeType=text/plain
@wildintellect
wildintellect / awstats-historical.sh
Created August 23, 2012 20:23
Bash process old apache logs with awstats
#!/bin/bash
# Alex Mandel 2011
# Apache 2.0 License
#Script outline for updating awstats from historical logs
#Take start number of oldest log via arguments
# grass.osgeo.org
configfile=$1
# grass-access.log
apachelogbase=$2
@wildintellect
wildintellect / latexlistings.tex
Created October 18, 2011 07:18
Example latex use of listings package with custom keywords added to a langauge definition.
\lstset{language=SQL,
numbers=left,
frame=single,
backgroundcolor=\color[RGB]{234,237,230},
numberstyle=\tiny,
basicstyle={\footnotesize\ttfamily\bfseries},
frameround=tttt,
breaklines=true,
keywordstyle=\color[RGB]{32,74,135},
commentstyle=\color[RGB]{143,89,2},
@wildintellect
wildintellect / 5rc5to5rc6.sh
Created August 28, 2011 03:26
osgeolive5rc5fix
#!/bin/sh
#
# Corrections file for 5.0rc5
# Must be run as sudo
#
# Theoretically these should be solved in upstream tickets if building from scratch.
# cd ~/gisvm/
# svn up
# cd bin
# wget https://gist.github.com/gists/1176202/download -O gist.tar.gz
Error: SiteDomain parameter not defined in your config/domain file. You
must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may
be wrong.
Check config file, permissions and AWStats documentation (in 'docs'
directory).
@wildintellect
wildintellect / cli.sh
Last active August 29, 2015 14:19
Bash Magic
# Make a list of all fonts in the layout mapserver wants for a font file
find /usr/share/fonts -name "*.ttf" | xargs -i sh -c 'echo $(basename {}) {}' > fonts.list
@wildintellect
wildintellect / sort.py
Last active August 29, 2015 14:06
Sorts bracketed photos into 3 subfolders
#!/usr/bin/env python
# -*- coding: utf_8 -*
#
# Script to sort bracketed photos by exposure into bins.
# Default assumes 3 photos per bracket set, into 3 folders
#
# Alex Mandel 2014
# tech@wildintellect.com
# requires python