This file contains 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
/** | |
* Extracts the type of the items in type T which is an array/set of type U - we want the type U. | |
* Aka un-boxes the type U in typescripts generic array T = Array<U>. | |
* If the supplied type is not an array then that type is returned as is | |
* See the example for more details | |
* | |
* @example | |
* type ArrayItemType = Unboxed<string[]> | |
* // ArrayItemType = string | |
* |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Still Drinking Gin And Juice</title> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
border: 0; |
This file contains 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
var url = `${location.protocol}/${wbinfo.proxy_magic}/proxy-fetch/https://www.google.com` | |
var res = await fetch(url) | |
console.log(await res.text()) |
This file contains 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
# /home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/__pycache__/__init__.cpython-36.pyc matches /home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/__init__.py | |
# code object from '/home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/__pycache__/__init__.cpython-36.pyc' | |
# /home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/__pycache__/_config.cpython-36.pyc matches /home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/_config.py | |
# code object from '/home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/__pycache__/_config.cpython-36.pyc' | |
# /home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/__pycache__/_compat.cpython-36.pyc matches /home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/_compat.py | |
# code object from '/home/john/PycharmProjects/pywb/.venv/lib/python3.6/site-packages/gevent/__pycache__/_compat.cpython-36.pyc' | |
import 'gevent._compat' # <_ |
This file contains 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
const Parser = require('node-warc') | |
const filenamifyURL = require('filenamify-url') | |
const fs = require('fs-extra') | |
const path = require('path') | |
const parser = new Parser('<path-to-warcfile>') | |
class WARCMap { | |
constructor () { | |
this._requests = new Map() |
This file contains 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 pywb.warcserver.index.cdxobject import CDXObject | |
def read_cdxj(path): | |
with open(path, 'rb') as cdxjin: | |
for line in cdxjin: | |
cdx = CDXObject(line) | |
if 'html' in cdx.get('mime') and "200" == cdx.get('status'): | |
print(cdx.get('url')) |
This file contains 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
// what substring in the URL indicates to us that we are editing the blog post | |
let isPostPreview = 'post-preview' | |
// the query selector to use for referencing the click trap element | |
let querySelectorForClickTrap = '.blogger-clickTrap' | |
// how long should the delay be before we attempt to remove the click trap element | |
let wait = 3000 | |
if (window.location.href.indexOf(isPostPreview) !== -1) { | |
setTimeout(() => { | |
console.log('nukeClickTrap') | |
let it = document.querySelector(querySelectorForClickTrap) |
This file contains 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
#!/usr/bin/env bash | |
#### | |
# Original version of this file was created by Dr. Chuck Cartledge | |
# as a make file and can be found in his WS-DL blog post: | |
# https://ws-dl.blogspot.com/2014/07/2014-0-7-2-ode-to-margin-police-or-how.html | |
#### | |
#### Set these variables to match your setup | |
CHECK="msThesis" |
You can get nodejs through
NewerOlder