Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
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
''' | |
Based on https://gist.github.com/enjalot/2904124 (in Python 2) -> quick-migrated to Python 3 | |
Usage: python server-cors | |
''' | |
import http.server as httpserver | |
class CORSHTTPRequestHandler(httpserver.SimpleHTTPRequestHandler): | |
def send_head(self): | |
"""Common code for GET and HEAD commands. |
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 python3 | |
# | |
# Modified from https://github.com/newren/git-filter-repo/blob/master/contrib/filter-repo-demos/lint-history | |
# | |
# pip3 install git-filter-repo black | |
# git pull | |
# git remote prune origin # clean up associated local branches too | |
# python3 black_history.py | |
# git remote add origin <url> | |
# git push -u origin --mirror --no-verify |
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 node | |
"use strict"; | |
const fs = require("fs"); | |
const SPEEDSCOPE_JSON_SCHEMA = "https://www.speedscope.app/file-format-schema.json"; | |
const [node, prog, ...options] = process.argv; | |
if (options[options.length - 2] !== "-o") { |
Find a replacement for Llama (R.I.P. 😢)
🦙 Keep using Llama! 🦙
- Llama still works and no other application seems to match Llama in terms of ease of use and cell-tower location (Llama's killer feature)
- Cell-tower location UX seems to be unmatched by the alternatives (training new locations, ignoring towers, seeing location events)
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
// Run code in Browser Console after enabling chrome debugging -- | |
// about:config => devtools.chrome.enabled => true | |
// https://developer.mozilla.org/docs/Tools/Browser_Console | |
try { | |
var tabPromise = SyncedTabs._internal.getTabClients(); | |
tabPromise.then((arrDevices) => { | |
if (arrDevices && arrDevices.length > 0){ | |
// Generate a string with the format of a bookmark export file | |
var d, e, out = '<!DOCTYPE NETSCAPE-Bookmark-file-1>\n<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">\n<TITLE>Bookmarks</TITLE>\n<H1>Bookmarks Menu</H1>\n<DL><p>\n'; | |
const escapeHtmlEntities = function(aText){return (aText || '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''')}; |
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
#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.
On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that
OlderNewer