Skip to content

Instantly share code, notes, and snippets.

leafstorm /
Created Apr 11, 2017
How to set up a CUPS print server running Fedora Server for an HP printer, and connect to it from your Fedora Workstation:

How to set up a CUPS print server running Fedora Server for an HP printer, and connect to it from your Fedora Workstation:

Run these commands on the server:

dnf install cups hplip
systemctl start cups
firewall-cmd --zone=FedoraServer --add-service=ipp
firewall-cmd --zone=FedoraServer --add-service=ipp --permanent

Then go to the CUPS Web admin at http://[server]:631 and go to the "Administration" page.

leafstorm / shapefile-urls.txt
Created Apr 6, 2015
The URL's to every shapefile offered for download by Wake County. `wget -i shapefile-urls.txt`
View shapefile-urls.txt
leafstorm / tillis-letter.txt
Created Feb 4, 2015
Letter to Sen. Thom Tillis regarding his recent statements on hand-washing.
View tillis-letter.txt
Dear Sen. Tillis,
While it may be the case that some unnecessary regulations are overburdening
our small businesses, the idea that requiring employees to wash their hands
after using the bathroom is unnecessary is completely disgusting. Washing
hands is acknowledged by every medical authority ever as a critical way to
prevent the spread of germs and other contaminants. The idea that public
establishments should be able to forgo such requirements shows a serious
lack of concern for the health of your constituents. I strongly encourage
you to apologize for your use of hand-washing as an example of an "unnecessary
leafstorm /
Created Nov 12, 2014
Python script for decoding NCSBE voter data
#!/usr/bin/env python3
Translates from latin-1 tab-separated-values to UTF-8 comma-separated values
on the fly, without trying to allocate the entire file.
It also prints progress updates.
import csv
leafstorm / packages.txt
Created Aug 6, 2014
Command-line packages to download on Red Hat family machines
View packages.txt
leafstorm /
Created Jul 31, 2014
An implementation of a Jython FastGetter that doesn't work for some reason.
package jesreflect;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.python.core.Py;
import org.python.core.PyObject;
* An optimized getter that's designed to invoke a Java class's
* getSomething method, with no arguments, and wrap the return value.
leafstorm /
Created Apr 20, 2014
Some thoughts on Easter, and why it's important.

"But now Christ has been raised from the dead, the firstfruits of those who have fallen asleep. For since death came through a man, the resurrection of the dead also comes through a man. For as in Adam all die, so also in Christ all will be made alive." -- 1 Corinthians 15:20-22

When I was at PyCon, I hung out with @jacobian, @brainwane, and some others while they were painting their nails. The subject turned to religion, and I quickly realized as a person who wasn't a secular humanist, I was a bit of an outlier.

When asked, I began talking about some of what's in the Bible. Jacob asked, "So, you believe the things in the Bible actually happened?" I said "yes." The conversation didn't last long afterwards...we were interrupted by something, I forget what. But given that it's Easter, I'd just like to expound a bit on how that idea is relevant to Christ's resurrection.

The attitude I see a lot of humanists have towards religion is, "Hey, believe whatever you want, so long as it makes you a better person." In

leafstorm /
Created Mar 23, 2014
A script that arranges all your mountpoints into a tree.
#!/usr/bin/env python3
This prints all your filesystem mounts in a tree so you can see how they
are laid out.
It only works on Linux because it uses ``/proc``.
:copyright: © 2014 Matthew Frazier
leafstorm /
Last active Aug 29, 2015
FOSS Fair 2014: Lessons Learned. Originally derived from a pair of paper towels at Ba-Da Wings.

FOSS Fair 2014: Lessons Learned

First off, FOSS Fair was a lot of fun, and I really look foward to the next one. But, I think we can run it better next time. So, here are my thoughts.

Early Coordination

We were disadvantaged this FOSS Fair by our late start date and our lack of connections. Fortunately, next year we can get started earlier, and we have a few key ideas:

  • Announce the Fair and call for volunteers as early as possible.
leafstorm /
Created Aug 30, 2013
Ideas for the Brickyard PC environment.


Brickyard is a design for a simple (simulated) personal computer environment, to be used for OS development. It presents a highly simplified and idealized set of hardware (display, input, storage) to the CPU, so that people interested in OS development can focus on writing critical OS features like scheduling, interrupt handling, and memory management, without having to wade through the complexities of modern (or classical) hardware.


Brickyard will use a MIPS32 CPU. This means that it will have to be emulated on almost all target platforms. However, even if ARM or x86 were selected, emulation would still be necessary on the "other" platform, and even on the host platform, highly platform- and OS-specific code would be necessary to allow for the needed degree of virtualization. Given that emulation is almost a requirement, MIPS was selected because it is easier to write emulators for than ARM or x86, but it still has a full GNU toolchain available.

A 32-bit CPU is used so that emulat