Skip to content

Instantly share code, notes, and snippets.

View thedward's full-sized avatar

Thedward Blevins thedward

View GitHub Profile

WHY PEOPLE THINK COMPUTERS CAN'T

Marvin Minsky, MIT

First published in AI Magazine, vol. 3 no. 4, Fall 1982. Reprinted in Technology Review, Nov/Dec 1983, and in The Computer Culture, (Donnelly, Ed.) Associated Univ. Presses, Cranbury NJ, 1985

Most people think computers will never be able to

@thedward
thedward / csvtojson.jq
Created July 27, 2022 16:06
Simple csvtojson script with jq
#!/usr/bin/env -S jq -Rnf
def csvarray:split(",")|map(fromjson);
def objectify($ks): [$ks,(.|csvarray)]|[transpose[] as [$key,$value]|{$key,$value}]|from_entries;
(input|csvarray) as $keys|[inputs|objectify($keys)|.csv_filename=input_filename]
| reduce .[] as $o ({}; .[$o.csv_filename]+=[($o|del(.csv_filename))])
| if length == 1 and has("<stdin>") then ."<stdin>" else . end
@thedward
thedward / extract_cookies.sh
Created July 2, 2022 21:49 — forked from hackerb9/extract_cookies.sh
Extract cookies.sqlite to cookies.txt for use in wget or curl.
#!/bin/sh -e
# extract_cookies.sh:
#
# Convert from Firefox's cookies.sqlite format to Netscape cookies,
# which can then be used by wget and curl. (Why don't wget and curl
# just use libsqlite if it's installed?)
# USAGE:
#
# $ extract_cookies.sh > /tmp/cookies.txt
@thedward
thedward / 01-scrape-airtable-schema.js
Last active April 27, 2019 01:09
Serialize Airtable Base Schema to JSON and Copy it to the Clipboard
(function () {
//-------------------------------------------------------------------------------------------------------------------------
// To use this script, go the the API page for your Airtable Base (something like https://airtable.com/<base_id>/api/docs).
// Then, open the javascript console (F12) on Chrome. Then copy this script and paste it into the console (and hit Enter).
// The schema serialized as JSON should now be in your clipboard.
//
// Alternatively, you can use the bookmarklet below.
//-------------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------
@thedward
thedward / bisac.csv
Created July 23, 2018 01:50 — forked from jveldboom/bisac.csv
BISAC codes and values
ANT000000 Antiques & Collectibles / General
ANT001000 Antiques & Collectibles / Americana
ANT002000 Antiques & Collectibles / Art
ANT003000 Antiques & Collectibles / Autographs
ANT005000 Antiques & Collectibles / Books
ANT006000 Antiques & Collectibles / Bottles
ANT007000 Antiques & Collectibles / Buttons & Pins
ANT008000 Antiques & Collectibles / Care & Restoration
ANT009000 Antiques & Collectibles / Transportation
ANT010000 Antiques & Collectibles / Clocks & Watches
@thedward
thedward / epub.css
Created March 31, 2018 03:51 — forked from adunning/epub.css
Better default epub.css for Pandoc (tested with iBooks)
/* This defines styles and classes used in the book */
body { margin: 0; text-align: justify; font-size: medium; font-family: Athelas, Georgia, serif; }
code { font-family: monospace; }
h1 { text-align: left; }
h2 { text-align: left; }
h3 { text-align: left; }
h4 { text-align: left; }
h5 { text-align: left; }
h6 { text-align: left; }
h1.title { }
@thedward
thedward / applescript-notes.md
Last active January 10, 2017 21:27
My notes about the abomination that is AppleScript
@thedward
thedward / userscript.js
Created November 22, 2016 20:55
adds magnet links to torrentz2.eu
// ==UserScript==
// @name torrentz2.eu magnet links
// @author thedward@barsoom.net
// @namespace thedward@barsoom.net
// @version 0.3
// @description adds magnet links to torrentz2.eu
// @match *://torrentz.eu/*
// @match *://torrentz.me/*
// @match *://torrentz.ch/*
// @match *://torrentz.in/*
@thedward
thedward / list-facet.js
Created October 11, 2016 15:31
Modified list-facet.js that adds a popup menu for 'TAG' column.
/*
Copyright 2010, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
@thedward
thedward / Time Travel Movies that Don't Completely Suck.md
Last active October 13, 2016 19:39
Time Travel Movies that Don't Completely Suck

Spoiler Alert

In some of the mentioned films, the time travel aspect may be a surprise twist and or simply not obvious from the outset, so just mentioning their titles in this context may merit a spoiler warning.

Time Travel Movies that Don’t Completely Suck

This is a list of time travel movies that don’t completely suck — more specifically movies where the time travel aspect is more than a poorly thought out plot device and the time travel actually makes some kind of logical sense even if it might not reflect our best current understanding of the universe. As a general rule, I’m excluding films that contain only one instance of time travel or films where time travel has no consequences1.