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`;
@steckel
steckel / bdd_cucumber-js.md
Created February 21, 2012 21:39
Workflow: Behavior Driven Development/Design for Front End Development (JavaScript)

Beyond any other definition, Behavior Driven Development/Design ("BDD") is a philosophy.

What is "BDD"?

"BDD" is a set of tools and techniques that exist to support one idea: good software is written to meet the needs of the stakeholders (typically clients).

These stakeholders know their business better than the people designing the software. It is the responsibility of developers to capture the business requirements and translate them into software.

BDD tools facilitate this as a process by letting developers author features first, which capture requirements in a domain-specific language. Code is developed by working on these high-level features, and then on code specifications.

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:

This file has been truncated, but you can view the full file.
var stockQuotes = [{"name":"Faux Derp","symbol":"MNI","index":"NASDAQ","price":"25.91","change_price":"1.69","change_percent":".45%","time":"Apr 23 7:59 EDT","estimated_price":"25.9157","estimated_change":".39%","open":"25.9162","high":"25.9187","low":"-46.09","volume":"25.9168M","avg_volume":"25.9112M","market_cap":"25.9138B"},{"name":"Pro Derp","symbol":"SCRS","index":"NASDAQ","price":"982.25","change_price":"63.12","change_percent":".79%","time":"Apr 23 7:59 EDT","estimated_price":"982.2557","estimated_change":".26%","open":"982.256","high":"982.2510","low":"928.25","volume":"982.2584M","avg_volume":"982.2513M","market_cap":"982.2576B"},{"name":"Cafe World","symbol":"MNI","index":"NASDAQ","price":"136.32","change_price":"47.58","change_percent":".2%","time":"Apr 23 7:59 EDT","estimated_price":"136.3266","estimated_change":".23%","open":"136.3239","high":"136.3264","low":"131.32","volume":"136.3217M","avg_volume":"136.3264M","market_cap":"136.3252B"},{"name":"Bear LLC","symbol":"RCK","index":"NASDAQ","price
@steckel
steckel / stocks.js
Last active December 22, 2015 16:49
This file has been truncated, but you can view the full file.
window.stockQuotes = [{"name":"Faux Derp","symbol":"MNI","index":"NASDAQ","price":"25.91","change_price":"1.69","change_percent":".45%","time":"Apr 23 7:59 EDT","estimated_price":"25.9157","estimated_change":".39%","open":"25.9162","high":"25.9187","low":"-46.09","volume":"25.9168M","avg_volume":"25.9112M","market_cap":"25.9138B"},{"name":"Pro Derp","symbol":"SCRS","index":"NASDAQ","price":"982.25","change_price":"63.12","change_percent":".79%","time":"Apr 23 7:59 EDT","estimated_price":"982.2557","estimated_change":".26%","open":"982.256","high":"982.2510","low":"928.25","volume":"982.2584M","avg_volume":"982.2513M","market_cap":"982.2576B"},{"name":"Cafe World","symbol":"MNI","index":"NASDAQ","price":"136.32","change_price":"47.58","change_percent":".2%","time":"Apr 23 7:59 EDT","estimated_price":"136.3266","estimated_change":".23%","open":"136.3239","high":"136.3264","low":"131.32","volume":"136.3217M","avg_volume":"136.3264M","market_cap":"136.3252B"},{"name":"Bear LLC","symbol":"RCK","index":"NASDAQ","pr