Skip to content

Instantly share code, notes, and snippets.

View steckel's full-sized avatar

Curtis Steckel steckel

  • San Francisco, CA
View GitHub Profile
Hey everyone,
​​
​​Tomorrow continue celebrating MLK day with a deep dive into his relationship with the labor movement and the connection between racial justice and economic justice. Sending along three articles and speech excerpts highlighting this which we’ll analyze tomorrow and discuss their application for our own organizing.
​​
​​An excerpt from his speech to Memphis Sanitation workers two weeks before his assassination and a short article with context. https://truthout.org/articles/martin-luther-king-jr-all-labor-has-dignity/ https://www.thenation.com/article/dr-king-knew-that-labor-rights-are-human-rights/
​​
​​An editorial from the New York Times in 1967 attacking King for connecting the anti-war movement to the civil rights movement. https://www.walterlippmann.com/docs1083.html
​​
​​A recent op-ed which offers a nuanced take on the common refrain that King was relentlessly optimistic https://www.nytimes.com/2020/01/19/opinion/martin-luther-king.html

Converting Quotes to Smart Quotes workflow

smart-quotes.awk can be used with awk to convert html file contents' quotes to smart quotes ("" -> “” and '' -> ‘’).

First run the script and create a new file with the output.

awk -f ~/Development/marxists.org/smart-quotes.awk input.htm > output.htm

Then run a difftool and check the output. I like to run colordiff and pipe it to less with a pattern for highlighting the characters we just attempted to edit.

declare enum TokenType {
CHARACTER_TOKEN = 'CHARACTER_TOKEN',
NULL_CHARACTER_TOKEN = 'NULL_CHARACTER_TOKEN',
WHITESPACE_CHARACTER_TOKEN = 'WHITESPACE_CHARACTER_TOKEN',
START_TAG_TOKEN = 'START_TAG_TOKEN',
END_TAG_TOKEN = 'END_TAG_TOKEN',
COMMENT_TOKEN = 'COMMENT_TOKEN',
DOCTYPE_TOKEN = 'DOCTYPE_TOKEN',
EOF_TOKEN = 'EOF_TOKEN',
HIBERNATION_TOKEN = 'HIBERNATION_TOKEN',
//!Portions of this code are licensed under the following license:
//! * @overview es6-promise - a tiny implementation of Promises/A+.
//! * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
//! * @license Licensed under MIT license
//! * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
//! * @version 4.1.0+f9a5575b
!function(e) {
var t = {};
function n(r) {
if (t[r])
@steckel
steckel / delete-all-messages.js
Last active January 18, 2019 07:31 — forked from IMcPwn/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Copy/paste the below script into the JavaScript console.
// invoke the function `clearMessages("username", "messageId")`
// where username is optional username to filter off of and where messageID is an optional ID that you wish to retain, but delete everything before
function clearMessages(username, before) {
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
const baseURL = `https://discordapp.com/api/channels/${channel}/messages`;
const execFile = require('child_process').execFile;
const flow = require('flow-bin');
function FlowPlugin(options) {
}
FlowPlugin.prototype.apply = function(compiler) {
var errors = [];

Keybase proof

I hereby claim:

  • I am steckel on github.
  • I am steckel (https://keybase.io/steckel) on keybase.
  • I have a public key ASCI2U_T9_qNFncMs4xfVj1hFW6CXnsttU3LAHlvaUYQiwo

To claim this, I am signing this object:

@steckel
steckel / barchart.html
Last active August 29, 2015 14:17
Swift playgrounds inspired by http://bost.ocks.org/mike/bar/2/
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.chart rect {
fill: steelblue;
}
.chart text {
fill: white;
@steckel
steckel / slice.js
Last active August 29, 2015 14:16
Adobe Illustator -> PDF -> XCode 6+ workflow
/**
* Poor man's Slicy for Adobe Illustator -> PDF -> XCode 6+ workflow
*
* This niave script scans the current document for any GroupItem or
* CompoundPathItem who's name matches "@2x" in anyway. Once found, it
* will attempt to export them as PDF to `~/Desktop`.
*
* verboseMode {Bool=false} - When enabled, the script will alert information
* about each layer it attempts to scan.
*
PROMPT="hello"
RPROMPT="world"