Open in app

Sign In

Write

Sign In

Mastodon
David Blume
David Blume

55 Followers

Home

About

Apr 9, 2020

A “Chinese Poker” Card Game

What is this? This is a fun card game that’s easy to learn. Each player tries to discard all the cards in their hand. When someone discards their last card, the others are penalized points for the cards left in their hands. Rules Before playing, the players agree to play to a certain score…

Card Game

4 min read

A “Chinese Poker” Card Game Variant
A “Chinese Poker” Card Game Variant
Card Game

4 min read


Sep 16, 2019

Have Only Unique Lines in your Bash History

tl;dr: Make these changes In your .bashrc add: HISTCONTROL=ignoredups:erasedups HISTIGNORE=”&:ls:[bf]g:exit:pwd:clear” shopt -s histappend And add the following cronjob: T=$(mktemp); tac "$HOME/.bash_history" | awk '!x[$0]++' | tac > "$T" && mv "$T" "$HOME/.bash_history" Using the duplicate lines in your history There’s an old Unix meme to share your most frequently used commands by issuing the following command:

Terminal

3 min read

Have Only Unique Lines in your Bash History
Have Only Unique Lines in your Bash History
Terminal

3 min read


Apr 26, 2019

That’s not my Cookie!

Yesterday I fixed an eight-year-old security bug in my bespoke password vault. After a user logs in, the server issues a new Cookie for them. It’s sure to restrict itself with Morsels like domain and max-age. The Python code looks like this: my_cookie = Cookie.SimpleCookie() my_cookie['sess'] = data() my_cookie['sess']['max-age'] = 30*60 my_cookie['sess']['domain'] =…

Python

3 min read

Python

3 min read


Mar 17, 2019

The Best LiveJournal and Google+ Backups

With Google+ going away, I made backups of both my LiveJournal and my Google+ accounts. Here’s why I love the backups: User Experience They’re super fast. Just static HTML5 (except for the search functionality), no frameworks, no libraries. You can navigate from the keyboard. Either the arrow keys, gaming WASD keys, or…

Web Development

3 min read

The Best LiveJournal and Google+ Backups
The Best LiveJournal and Google+ Backups
Web Development

3 min read


Nov 25, 2018

Avoiding Unix’s logrotate with sed and tail

Or, My most egregious one-liner ever — Some of my cronjobs run on a shared hosting server where I don’t have access to /etc/logrotate or /var/log, so I can’t use logrotate to manage their logs. They write log lines to files in a log directory in my home directory. All I’ll ever want from these logs is…

Programming

4 min read

Programming

4 min read


Nov 20, 2018

An Open Letter to eBay

tl;dr: Don’t delete user accounts without (always) notifying the user. I had an active eBay account, and was proud of my good reputation, curated by transactions from before 2004 to 2015. But then the account went idle in 2015, and I got an email that said, Unfortunately, since you haven’t…

EBay

2 min read

An Open Letter to eBay
An Open Letter to eBay
EBay

2 min read


Nov 17, 2018

One Little Code Change

I have a rarely-used email account for password resets and such. Since that’s all it’s for I don’t monitor it regularly, because it should only get email when I request the password reset myself. But then what if it gets email for another reason? I’d want to know. So I…

Github

2 min read

One Little Code Change
One Little Code Change
Github

2 min read


Nov 11, 2018

Do You Know What Freedom Means?

Do you really know what freedom means It’s a government 45 and an M-16 It’s 13 months in a jungle sopping wet It’s helping Vietnam celebrate Tet How deep in your pockets will you really reach to keep your precious Freedom of Speech You read the papers you watch the news You tell…

Poetry

1 min read

Do You Know What Freedom Means?
Do You Know What Freedom Means?
Poetry

1 min read


Oct 7, 2018

Getting Pip working for Python 3.7 on Rasbian

I came across a Raspberry Pi Stack Exchange question where I had the same question, but it was closed as off-topic. How to install Python 3.7 with SSL? The problem is that if you compile Python 3.7 on Raspbian Jessie, that Python won’t build the module _ssl. And since it…

Raspberry Pi

2 min read

Getting Pip working for Python 3.7 on Rasbian
Getting Pip working for Python 3.7 on Rasbian
Raspberry Pi

2 min read


Aug 10, 2018

How to Torture your Kids from Anywhere

I can log in to my home’s router from anywhere and configure the local network as needed, including stopping YouTube and Netflix when the kids need to do homework. I have a Raspberry Pi at home serving a website. My Internet Service Provider assigns my home’s IP address dynamically. So…

Raspberry Pi

2 min read

How to Torture your Kids from Anywhere
How to Torture your Kids from Anywhere
Raspberry Pi

2 min read

David Blume

David Blume

55 Followers

A rock-climbing father of two and software developer.

Following
  • Cory Doctorow

    Cory Doctorow

  • The Pragmatic Programmers

    The Pragmatic Programmers

  • Lessig

    Lessig

  • Netflix Technology Blog

    Netflix Technology Blog

  • Anna Maltby

    Anna Maltby

See all (18)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams