Skip to content

Instantly share code, notes, and snippets.

View boydx's full-sized avatar
😀

Boyd Shearer boydx

😀
View GitHub Profile
@boydx
boydx / exifcoords.sh
Last active September 13, 2022 22:45
Use exiftool to get img coords
# exiftool: https://exiftool.org/
x=$(ls IMG*) # or *.jpg, *.heic, etc...
for y in $x
do
echo $y
exiftool -n -p '+$GPSlatitude,$GPSlongitude' $y
done
@boydx
boydx / regex.txt
Last active July 18, 2021 16:16
Add leading 0 stripped from FIPS code in CSV files
This is a problem when number string fields are encoded as numbers.
Regex expression in VS Code where the FIPS code column is surrounding by two string fields.
step 1:
find pattern breaks search into two subexpressions
(",)([0-9]{4},")
step 2:
replace pattern inserts 0 in front of the second subexpression
$10$2
To wrap FIPS codes in quotes, find the comma before and after the 5-digit number. Insert quote.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@boydx
boydx / brews.geojson
Created February 21, 2018 22:01
brews
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
#buttonStyle {
background: red;
}
@boydx
boydx / select_ky.sql
Created January 12, 2017 04:09
Select Kentucky
/* Select KY from state polygon layer */
SELECT * FROM
state_polygon_layer
WHERE
state_name = 'Kentucky'
@boydx
boydx / 0_reuse_code.js
Created July 9, 2016 16:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console