Skip to content

Instantly share code, notes, and snippets.

View skorasaurus's full-sized avatar

Will Skora skorasaurus

View GitHub Profile
@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;
$search_unique_id = esc_attr( wp_unique_id() );
?>
<form role="search" method="get" class="search-form"
action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label for="search-input-<?php echo ( $search_unique_id ); ?>" class="label-large"> Enter what you want to search for</label>
<input type="search" id="search-input-<?php echo ( $search_unique_id ); ?>" required class="search-field" placeholder="<?php echo '" name="s"'; ?> />
================================
twitter:
username/id_stR
How open cleveland survives without govt support:
minimal open data;
(slide of our open data census ranking)
function search_redirect_form() {
if (is_search() && ! empty( $_GET['simple'] ) ) {
if (isset($_GET['simple']) && $_GET['simple'] == 'dogpile') {
$query = sanitize_text_field($_GET["s"]);
wp_redirect(esc_url('theurl1'. $query));
exit();
}
if (isset($_GET['simple']) && $_GET['simple'] == 'altavista') {
$query = sanitize_text_field($_GET["s"]);
wp_redirect(esc_url('url2'. $query .'/field/all/mode/all/conn/and/order/nosort'));