Skip to content

Instantly share code, notes, and snippets.

(use-modules (gnu)
(gnu system nss)
(guix utils)
(gnu packages vim)
(nongnu packages linux)
(nongnu system linux-initrd))
(use-service-modules desktop sddm xorg)
(use-package-modules certs gnome)
(operating-system
@rjsheperd
rjsheperd / gdal-nodata-convert.sh
Created October 4, 2022 19:01
Converts nodata value in a GeoTiff using GDAL
#!/usr/bin/env bash
cp "${INPUT}.tif" "${INPUT}-removed-nodata.tif"
INPUT="${INPUT}-removed-nodata.tif"
OUTPUT="${OUTPUT}.tif"
# Use gdal_edit.py to unset nodata metadata so we can use them in gdal_calc.py
gdal_edit.py -unsetnodata $INPUT
@rjsheperd
rjsheperd / update_styles.clj
Created April 2, 2022 12:26
Update All GeoServer Layers to Style
#!/usr/bin/env bb
(def gs-creds {:url "https://<url-to-geoserver>/geoserver/rest"
:user "admin"
:pass "<password>"})
(def style "special-style")
(def auth {:basic-auth [(:user gs-creds) (:pass gs-creds)]})

CSS Style Guide

Refrain from using ID selectors when creating styles.

Use the 'BEM' naming convention when writing CSS selectors:

// Block is the top level 'component'
.button { }

// Elements are within a block and use '__' to nest within the top-level block
// The Module object: Our interface to the outside world. We import
// and export values on it. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(Module) { ..generated code.. }
// 3. pre-run appended it, var Module = {}; ..generated code..
// 4. External script tag defines var Module.
// We need to check if Module already exists (e.g. case 3 above).
// Substitution will be replaced with actual code on later stage of the build,
// this way Closure Compiler will not mangle it (e.g. case 4. above).
// Note that if you want to run closure, and also to use Module
@rjsheperd
rjsheperd / trimet_ridership_spring_2019.geojson
Created December 14, 2019 21:52
Trimet Ridership (Spring 2019)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjsheperd
rjsheperd / index.html
Created October 13, 2019 05:33 — forked from tyrasd/index.html
minimal Overpass Leaflet example
<!DOCTYPE html>
<html>
<head>
<title>Example: Overpass-API with Leaflet.js</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<style>
body {
padding: 0;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rjsheperd
rjsheperd / pdxreporter_reports.json
Created August 4, 2019 17:43
PDX Reporter API - Items
{
"status": "success",
"items": [
{
"address_input_value_x": 7645087.432,
"address_input_value_y": 681655.451,
"date_created": "08/03/19 9:48PM",
"text_input_value": "White Stretch-Suburban Limo (Plate: ASPEN M) blocking the Better Naito Bike/Walk Lanes. Blocked the lanes for well over 10 minutes.",
"date_updated": "08/03/19 9:48PM",
"files": [
@rjsheperd
rjsheperd / cvim.css
Created December 21, 2017 18:22
CVim Bindings
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, monospace, Arial;
font-size: 10pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;
width: 100%; left: 0;