Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View meyerweb's full-sized avatar

Eric A. Meyer meyerweb

View GitHub Profile
@meyerweb
meyerweb / closings.php
Last active October 21, 2021 15:04
School Closings scraper script (ft. anonymized Dark Sky API call)
if ($debug) {
error_reporting(E_ALL);
ini_set('display_errors', '1');
$json = load_file("testdata_darksky/forecast_20170131.json");
$html = load_file("testdata_closings/wjw_schools-20170131.html");
} else {
$json = get_closings("https://api.darksky.net/forecast/%%%%%%%%%%/%%%%%%%%%%%");
$html = get_closings("http://s3.amazonaws.com/wjwclosings/wjw_schools.html");
}
[detached HEAD 29d63f4] Resolved conflicts
2 files changed, 7 insertions(+), 7 deletions(-)
~/sites/igalia/wpewebkit.org ((no branch, rebasing issue-61))> git push
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use
git push origin HEAD:<name-of-remote-branch>
~/sites/igalia/wpewebkit.org ((no branch, rebasing issue-61))> git rebase --continue
@meyerweb
meyerweb / .eleventy.js
Last active March 6, 2021 19:54
Eleventy problem
// !!!!! the next two functions do NOT break release.md !!!!!
eleventyConfig.addCollection("tagList", collection => {
const tagsSet = new Set();
collection.getAll().forEach(item => {
if (!item.data.tags) return;
item.data.tags
.filter(tag => !['post', 'all'].includes(tag))
.forEach(tag => tagsSet.add(tag));
});
@meyerweb
meyerweb / wp-admin.css
Last active December 4, 2017 19:06
WordPress administration-area styles (applied with the Add Admin CSS plugin)
.status-future td.date {font-weight: bold;}
.status-future td.date abbr {font-style: italic;}
.status-future {background-color: #BEB;}
.status-pending {background-color: #EBB;}
.status-draft {background-color: #EEB;}
.status-future, .status-pending, .status-draft {
background-image: repeating-linear-gradient(-45deg, transparent, rgba(255,255,255,0) 9px, rgba(255,255,255,.25) 10px, rgba(255,255,255,.25) 19px, rgba(255,255,255,0) 20px);
}
#future-posts li, #published-posts li {
display: grid;
/* styles for collapsing media in tweets and showing an arrow to indicate their existence
but only at the top level */
li.stream-item .has-content .AdaptiveMedia,
li.stream-item .has-cards .card2 {
display: none;
}
li.stream-item .has-content:after,
li.stream-item .has-cards:after,
GAME
{
version = 1.1.2
Title = Fred Kerssidy (SANDBOX)
Description = No description available.
linkURL =
linkCaption =
Mode = SANDBOX
Status = 1
scene = 5
ship = kOSprobe 002
version = 1.0.5
description =
type = VAB
size = 4.582137,13.75932,4.582137
PART
{
part = probeCoreOcto_4293521210
partName = Part
pos = -0.1120743,10.59506,0.4055918
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
/* styles for collapsing media in tweets and showing an arrow to indicate their existence
but only at the top level */
ol.stream-items > .expanding-stream-item:not(.open) .OldMedia,
ol.stream-items > .expanding-stream-item:not(.open) .AdaptiveMedia {
display: none;
}
@meyerweb
meyerweb / dabblet.css
Created August 1, 2013 16:31
Untitled
section {margin: 2em 0; border: 2px dotted red;}
section div:first-child {background: silver;}
section div:last-child {background: cyan;}
section#flexbox {display: flex;}
section#flexbox div {flex: auto; width: auto;}
section#display {display: table;}
@meyerweb
meyerweb / US Custom.keylayout.xml
Last active December 11, 2015 02:28
An OS X US keyboard layout file with some customizations (created using Ukelele running on Snow Leopard, if that matters).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Last edited by Ukelele version 2.1.10 on 2012-07-12 at 12:43 (EDT)-->
<!--
An OS X US keyboard layout file with the following customizations:
* Option-. ONE DOT LEADER ( ․ )
* Option-h UPWARDS WHITE ARROW ( ⇧ )
* Option-j UP ARROWHEAD ( ⌃ )
* Option-k OPTION KEY ( ⌥ )