This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Styling hr elements */ | |
/* ref: http://html5doctor.com/small-hr-element/ */ | |
body {background: #ddd;} | |
h1 {font-weight: normal; font-size: 1.5em;} | |
ol {margin-top: 5em;} | |
hr {margin: 1.5em 0;} | |
hr:nth-child(2) { | |
border: 0; | |
border-top: 1px solid #999; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Line-breaks suiting auto-p in WordPress: --> | |
Paragraph with a footnote<a id="a1" href="#f1"><sup>[1]</sup></a> and more text afterwards. | |
Another paragraph with another footnote<a id="a2" href="#f2"><sup>[2]</sup></a> and more text afterwards. | |
<!-- At the end of all paragraphs: --> | |
<footer class="footnotes"> | |
<a id="f1" href="#a1">[1]</a> Footnote #1 here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Responsive Table</title> | |
<meta charset="UTF-8"> | |
<meta name="description" content="How to create a responsive table"> | |
<meta name="keywords" content="HTML,CSS"> | |
<meta name="author" content="Martine Dowden"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Calendar of Police Killings</title> | |
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet"> | |
<style> | |
body { font-family: 'Fira Sans'; text-align: center; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from json import load, JSONEncoder | |
from optparse import OptionParser | |
from re import compile | |
float_pat = compile(r'^-?\d+\.\d+(e-?\d+)?$') | |
charfloat_pat = compile(r'^[\[,\,]-?\d+\.\d+(e-?\d+)?$') | |
parser = OptionParser(usage="""%prog [options] | |
Group multiple GeoJSON files into one output file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works with Node v12.0 and puppeteer 4.0 | |
const URL = 'https://public.tableau.com/views/PPV_15924847800480/ppv_db?%3Aembed=y&%3AshowVizHome=no&%3Adisplay_count=y&%3Adisplay_static_image=n&%3AbootstrapWhenNotified=true&%3Alanguage=en&:embed=y&:showVizHome=n&:apiID=host0'; | |
const puppeteer = require('puppeteer'); | |
function parseDataDictionary(jsonParsed) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"1960":316.91, | |
"1961":317.64, | |
"1962":318.45, | |
"1963":318.99, | |
"1964":319.62, | |
"1965":320.04, | |
"1966":321.38, | |
"1967":322.16, | |
"1968":323.04, |
Couldn't be bothered to look up the latest workout tracking app, so decided to stick to Google Sheets for now. One problem with this approach is that while it is easy on desktop GSheets to fill out a current timestamp (Command-Option-Shift-semicolon in MacOS), no such shortcut is available AFAIK in the iOS version of Google Sheets.
So I wrote a little custom function in Google Apps Script to do the following:
In an active Google Sheets spreadsheet, given a tab/sheet named myworkouts
with a header named datetime
, the following script updates a row's corresponding "datetime" column when a value is entered into a first column cell:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a hack, a quick and dirty console script for RT/tweets (with replies) removal w/o API | |
// To be used in: https://twitter.com/Username/with_replies | |
// Set your username (without @) below (case-sensitive) to correctly trigger the right Menu | |
const tweetUser = 'Username' | |
// BUG, With above we still trigger Menu on some replies but relatively harmless. | |
// @Hack Implement simple has() for querySelector | |
const querySelectorHas = function( parent, child ){ |
NewerOlder