Skip to content

Instantly share code, notes, and snippets.

View skorasaurus's full-sized avatar

Will Skora skorasaurus

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Attach a popup to a marker instance</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v1.10.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v1.10.0/mapbox-gl.css" rel="stylesheet" />
<style>
body { margin: 0; padding: 0; }
@skorasaurus
skorasaurus / index.html
Created April 30, 2020 16:25
this is of mapbox.js locations.html example that I showed to mike and david and also used for measuring performance when comparing mapbox-gl vs mapbox.js for cpl 2020, april
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.css">
@skorasaurus
skorasaurus / index.html
Last active May 6, 2020 13:20
ocations-gl.html example that I showed to mike and david and also used for measuring performance when comparing mapbox-gl vs mapbox.js for cpl 2020, april
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://api.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js"></script>
@skorasaurus
skorasaurus / tabula-SeniorPollPlacesfor03172020-2-2.csv
Created March 14, 2020 19:59
from cuyahoga county board of elections, as of 2020-03-14 3:00PM
Number of Precincts, Impacted Precinct1 Precinct2 Precinct3 New Location New Location Address latitude longitude
1 CLEVE-03-G -- -- FRANKLIN CIRCLE CHRISTIAN CHURCH 1688 FULTON ROAD 41.4868405 -81.7090327
3 CLEVE-06-D CLEVE-06-O -- JOHN HAY HIGH SCHOOL 2075 STOKES BOULEVARD 41.5018502 -81.6121253
1 CLEVE-07-Q 0 -- FATIMA FAMILY CENTER 6600 LEXINGTON AVENUE 41.51102 -81.64422
1 CLEVE-05-J 0 -- BOYS AND GIRLS CLUB OF CLEVELAND 6114 BROADWAY AVENUE 41.4639743 -81.6486552
2 ECLE-02-A -- -- SUPERIOR ELEMENTARY SCHOOL 1865 GARFIELD ROAD 41.5218238 -81.5880455
1 EUCLID-03-B 0 -- ARBOR ELEMENTARY SCHOOL 20400 ARBOR AVENUE 41.5912114 -81.5384769
1 CLEVE-09-Q -- -- LANGSTON HUGHES LIBRARY 10200 SUPERIOR AVENUE 41.5212428 -81.6171654
1 EUCLID-07-C -- -- SHOREVIEW ELEMENTARY SCHOOL 490 EAST 260TH STREET 41.6132919 -81.5050344
1 EUCLID-03-A -- -- ARBOR ELEMENTARY SCHOOL 20400 ARBOR AVENUE 41.5912114 -81.5384769
@skorasaurus
skorasaurus / tabula.geojson
Created March 14, 2020 19:55
updated locations of board of elections, cuyahoga, as of 2020-03-14, 3:00PM
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<style>
.latitude {
stroke-width:1.5px;
stroke:#777;
fill:none;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@skorasaurus
skorasaurus / gist:60d56a91c68b13ea8e1a5496dcffb1b4
Last active February 6, 2020 01:56
FRom a ubuntu 20.04 disk of 2020-01-20 build i think.
ntu@ubuntu:~$ sudo smartctl --all /dev/sda4
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-9-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Silicon Motion based SSDs
Device Model: TEAML5Lite3D480G
Serial Number: AC20190304A0100710
Firmware Version: Q0410A
User Capacity: 480,103,981,056 bytes [480 GB]
@skorasaurus
skorasaurus / 1-wp-cli-shortcuts
Last active February 1, 2025 18:38
Manage WordPress via WP-CLI with these Shortcuts, scripts, functions, aliases.
update text inside a post
(we work with 3rd party vendors, their urls occasionally change;
or we changed a campaign's name used in google analytics) and limit it to ONLY published posts.
(sometimes, our marketing team wants to what see how content was EXACTLY in the past). wp-cli's search-replace command by default make edits in revisions.
(in this command, 'before' is what you want to get rid of and 'after' is what you want to replace 'before' with.
`wp db query "UPDATE $(wp db tables "*_posts") SET post_content = REPLACE(post_content, 'before', 'after') WHERE post_status = 'publish';"`
Sometimes it can be appropriate to provide extra information in a link just for screen reader users, via hidden text. The text is hidden by CSS, using the clip method.
Begin code:
<head>
<title>Museum Information</title>
<style>
.visually-hidden {
position: absolute;
clip: rect(0 0 0 0);
border: 0;