Skip to content

Instantly share code, notes, and snippets.

This is extremely Linux only due to the dependency on v4l2loopback and obs-v4l2sink, though, as mentioned below, CatxFish has also written a similar plugin for Windows. I have not tried it, YMMV.

What is this?

Wanna composite your face (as a video, from your webcam), on top of a video of your choosing, and use that for your conference calls? NOW YOU CAN! (Zoom only supports still-image virtual backgrounds. BOO.)

Note: you will need a greenscreen for this. (You can try all the software-y bits below without one, but it won't look very good at all.) $60 on Amazon, you can probably find one cheaper. (Or make. Or, honestly, it might work if you

from django import template
from django.template.defaultfilters import stringfilter
from django.db.models import Q, Exists, OuterRef
from django.utils.safestring import mark_safe
from ..models import Submission, Review
import re
replacements = [
("University of Michigan", "school"),
@ismith
ismith / cc.png
Last active January 19, 2021 23:43
Dark's caption embedding script
cc.png

Robert Weitbrech - and I had to look up his name, though I know the story - is the reason we have, or had (it is a largely obsolete technology now), TTYs in the deaf community.

The exact details of his invention are not known to me, but he took existing teletypewriter technology and brought it into use by deaf people as a means of text communication. ("Not known to me" - teletypewriters existed in some form for use in radio and telegraph comms, but weren't used by deaf people; Weitbrech also developed an innovative acoustic coupler so you could drop a phone handset onto your TTY.)

There's two pieces of this that interest me in a disability+tech context.

One is that this is a collapse of the unfortunate dichotomy of producer vs consumer. I think this is a dichotomy that is resisted in a number of cultures and contexts Project Alloy has ties to - maker culture, hacker culture, FOSS - but there is also a uniquely disability angle to it, in which disabled people are often fram

FORM_OPEN_DATE = "2014-12-20 08:00";
FORM_CLOSE_DATE = "2014-12-25 23:30";
RESPONSE_COUNT = "";
/* Web tutorial: http://labnol.org/?p=20707 */
/* Initialize the form, setup time based triggers */
function Initialize() {
deleteTriggers_();

Problem

Given an array of words and a width maxWidth, format the text such that it reads right-to-left, and each line has exactly maxWidth characters and is fully (left and right) justified.

You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra spaces represented as '_' when necessary so that each line has exactly maxWidth characters.

Extra spaces between words should be distributed as evenly as possible. If the number of spaces on a line do not divide evenly between words, the empty slots on the right will be assigned more spaces than the slots on the left.

For the last line of text, it should be right justified and no extra space is inserted between words.

Note:

Problem Description

Reddit.com has a tree presentation for the posts. For example:

https://www.reddit.com/r/programming/comments/2szuc2/creating_a_doomstyle_3d_engine_in_c_code_walk_and/

The topic has more than 200 posts, and it shows the "top 200 comments". The tree layout shows the comments about the topic, and context association.

@ismith
ismith / keybase.md
Created November 15, 2016 00:51
keybase.md

Keybase proof

I hereby claim:

  • I am ismith on github.
  • I am ismith (https://keybase.io/ismith) on keybase.
  • I have a public key whose fingerprint is B0EB 32F7 80AF 03FF 4E70 0673 0FE4 0AD7 1399 334F

To claim this, I am signing this object:

@ismith
ismith / apt-cacher-ng-docker-os-x.md
Last active November 12, 2016 21:56
Local apt repo cache using docker

This uses two containers - one running apt-cacher-ng, and one running rawdns. In fact, this gist is mostly based on the apt-cacher-ng hack documented the rawdns repo.

This includes a few quirks for OS X, which I'll make note of.

  1. Edit ('create') /etc/rawdns.json to look like the rawdns.json in this gist.
  2. Run a rawdns container: docker run -d --name rawdns -p 53:53/udp -v /var/run/docker.sock:/var/run/docker.sock -v /private/etc/rawdns.json:/etc/rawdns.json:ro tianon/rawdns rawdns /etc/rawdns.json. Note that this references /private/etc/rawdns.json; this is because on OS X, /etc is symlinked to /private/etc, and you can't mount a symlink.
  3. Update your DNS resolver to use 127.0.0.1! Assuming OS X, this is in the Network preference pane, behind Advanced -> DNS.
  4. dig dns.docker should now include SERVER: 127.0.0.1#53(127.0.0.1).
  5. Ru
@ismith
ismith / 2016-03-31.csv
Last active March 31, 2016 20:48
Elevator outages - BART since October 17, 2015 & Muni since late February 2016
Elevator Number of Outages Total hours out Average outage length
Union City Fremont Platform Elevator 6 622.95 103.83
Civic Center Street Elevator 40 357.53 8.94
Powell Platform Elevator 59 354.89 6.02
16th St Mission Street Elevator 26 337.75 12.99
El Cerrito Plaza Richmond Platform Elevator 3 337.12 112.37
12th St Oakland Ogawa Plaza Elevator 20 239.8 11.99
Muni: Civic Center 16 234.6 14.66
Coliseum Platform Elevator 38 212.45 5.59
Civic Center Platform Elevator 34 197.13 5.8