Skip to content

Instantly share code, notes, and snippets.

View ddbeck's full-sized avatar

Daniel D. Beck ddbeck

View GitHub Profile
#!/usr/bin/env fish
argparse --name=check-urls 'm/since-master' 'v/verbose' -- $argv
or exit
if set -q _flag_since_master
# lines added since master
git diff -U0 master HEAD | grep '^[+]' | read -z diffed
else
# lines added in the current index
@ddbeck
ddbeck / 2018-03-17-output.text
Created March 17, 2018 10:44
BCD deprecated experiments
api.AnimationEvent.initAnimationEvent
api.FetchEvent.client
api.HTMLShadowElement
api.HTMLShadowElement.getDistributedNodes
api.Headers.getAll
api.PositionSensorVRDevice
api.PositionSensorVRDevice.getImmediateState
api.PositionSensorVRDevice.getState
api.PositionSensorVRDevice.resetSensor
api.PushRegistrationManager
@ddbeck
ddbeck / bannon_phone_call_script.md
Last active November 16, 2016 08:30
scripts for calling your elected representatives

Hi my name is [your name] and I'm calling from [your city]. I'd like to express my opinion to [Senator/Representative] [the senator or representative's last name] on an important issue. Have I reached the right office for that?

[Usually the answer is yes, though rarely you'll be put on hold or transferred to someone else.]

Thanks!

As you may know, the president-elect has named Stephen Bannon as chief strategist. Bannon is well-known white nationalist and anti-semite and he has no business working in the White House.

I'm calling to ask that the [senator/representative] speak publicly against Bannon's appointment and against the hatred he represents.

@ddbeck
ddbeck / brief_example.py
Last active November 8, 2016 12:03
example WebFaction install script
-----BEGIN WEBFACTION INSTALL SCRIPT-----
#!/usr/bin/env python2.7
"""This is a docstring."""
import sys
import xmlrpclib
server = xmlrpclib.ServerProxy('https://api.webfaction.com/')
@ddbeck
ddbeck / brew_config.shell
Last active November 4, 2016 14:30
brew update failure with git formula
$ brew config
HOMEBREW_VERSION: 1.0.9-41-g0028cf9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 0028cf9fb85e7fecb4ad803a817600068c821dc9
Last commit: 14 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 3ade4a12394af41ad4815edd7b1acdbd0b95b56f
Core tap last commit: 57 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
# modify your .gitconfig to include these in the alias section
[alias]
svnci = !$HOME/bin/git-svn-safe.sh dcommit
svnre = !$HOME/bin/git-svn-safe.sh rebase
svnsync = !git svnre && git svnci
@ddbeck
ddbeck / wtd_london_23_feb_2016_notes.md
Created February 24, 2016 16:50
Write the Docs London 23 February 2016 Notes

Write the Docs London 23 February 2016 Notes

I had some excellent conversations with folks at the Write the Docs London meetup on 23 February 2016. Here's some links to things I remember talking about. —@ddbeck

Podcast recommendations

At dinner we talked a little about podcasts. Here's some podcasts that came up:

  • Slate's Working: interviews with people about their jobs
  • 5by5: a podcast network created by a former technical writer and software developer (and fellow graduate of the fine tech writing program at the University of Central Florida), Dan Benjamin. Lots of different podcasts, mostly conversational format on different topics (the first few episodes of Back to Work are probably a good introduction).
@ddbeck
ddbeck / drugs.json
Created October 19, 2015 12:49
A list of pharmaceutical drug names
{
"description": "A list of pharmaceutical drug names.",
"source": "The United States National Library of Medicine, http://druginfo.nlm.nih.gov/drugportal/",
"drugs": [
"Abacavir Sulfate",
"Abarelix",
"Abatacept",
"Abciximab",
"Abelcet",
"Abilify",
@ddbeck
ddbeck / toggleDistractions.js.scpt
Last active August 29, 2015 14:22
A script to toggle distractions from Mac OS X Dock badges
// Use this Mac OS X automation script to quickly hide notifications for
// distracting apps. Put the names of the distracting apps in the
// `distractingApps` array and save the script. Run the script to toggle the
// badges on and off.
// Tip: To run this script much faster, move the distracting apps to the top of
// the list in System Preferences's Notifications pane.
var distractingApps = ['Tweetbot', 'Slack']
@ddbeck
ddbeck / .gitconfig
Created April 22, 2013 19:42
A shell script and alias to avoid making dumb mistakes with git-svn.
[alias]
ci = commit
co = checkout
st = status
wdiff = diff --color-words
svnci = !$HOME/src/dotfiles/git-svn-safe.sh dcommit
svnre = !$HOME/src/dotfiles/git-svn-safe.sh rebase