Skip to content

Instantly share code, notes, and snippets.

View HaydenElza's full-sized avatar

Hayden Elza HaydenElza

View GitHub Profile
@HaydenElza
HaydenElza / AutoClicker.sh
Created June 15, 2015 03:25
Auto-Clicker using xdotool on linux
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10000 ]; do
xdotool click 1
sleep 0.001s
echo The counter is $COUNTER
let COUNTER=COUNTER+1
done
@HaydenElza
HaydenElza / layers.html
Last active September 9, 2017 21:49
Format GeoServer getCapabilities into a table with layers and download links.
<html>
<head>
<title>Coastal Data Access Matrix</title>
<style>
.Layers-Table {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: normal;
border-left: 1px solid black;
border-bottom: 1px solid black;
@HaydenElza
HaydenElza / feature_class_to_postgres_v3.py
Created February 13, 2019 21:04
Load a spatial dataset from feature class to a table in postgres.
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# feature_class_to_postgres_v3.py
# Load county dataset from feature class to a table in postgres.
# Hayden Elza ([email protected])
# Created: 2018-08-09
# Modified: 2018-08-20
#------------------------------------------------------------------------------
@HaydenElza
HaydenElza / hooferflag.gs
Last active April 29, 2021 19:32
Tracks changes in UW Madison Hoofer Sailing Club lake conditions flag. Flag status is saved in a google sheets to display the history later. Visit site at: https://elza.me/hooferflag
function fetchData() {
// Fetch data
//var url = 'http://testout.hoofersailing.org/feed.php'
//var url = 'https://ehs.wisc.edu/current-flag.php'
var url = 'https://endpoints.wams.doit.wisc.edu/ehs.wisc.edu/LakeConditions/Api/'
var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true});
// Process response to object
var json = response.getContentText().replace(/\(|\)|;/g, '');
var data = JSON.parse(json);
// ==UserScript==
// @name Survey Notes XL
// @namespace http://elza.me
// @version 0.1
// @description Default to XL images. Go big or go home!
// @author Hayden Elza
// @match http://digicoll.library.wisc.edu/cgi-bin/SurveyNotes/*
// @require https://code.jquery.com/jquery-latest.js
// ==/UserScript==
-- Enable postgis
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;
This file has been truncated, but you can view the full file.
[
{
"rank": "1",
"chamber": "Rep.",
"firstname": "Darrell ",
"lastname": "Issa ",
"party": "R",
"state": "California",
"gender": "M",
"worth": "283250020",
<form action="/set-timer" method="get" id="timer-form">
<label for="time-select">Enter a date and time for the glitter bomb to detonate:</label>
<input id="time-select" type="datetime-local" name="time" />
<button type="submit" form="timer-form">Start Timer</button>
</form>
<script>
document.getElementById("time-select").value = Date().toString();
</script>
@HaydenElza
HaydenElza / amend-second-to-last-commit.md
Last active January 19, 2024 21:27
Git amend second to last commit.

Amend Second to Last Commit

Steps

  1. Stash any unstaged changes

  2. Rebase to desired commit

    git rebase -i HEAD~2
    
@HaydenElza
HaydenElza / README.md
Created February 29, 2024 23:34
Disable xss prevention for Esri feature service.

ArcGIS Online: Update Service to Allow HTML Links in Fields

By default feature layers hosted on ArcGIS Online do not allow you to insert links into fields because it could be "harmful". This code snippet allows you to edit the service definition of a feature layer to allow links to be added to fields.