Skip to content

Instantly share code, notes, and snippets.

Matthew Frazier leafstorm

Block or report user

Report or block leafstorm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@leafstorm
leafstorm / print-server.md
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:
View print-server.md

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
leafstorm / mountree.py
Created Mar 23, 2014
A script that arranges all your mountpoints into a tree.
View mountree.py
#!/usr/bin/env python3
"""
mountree
========
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
leafstorm / brickyard.md
Created Aug 30, 2013
Ideas for the Brickyard PC environment.
View brickyard.md

Brickyard

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.

The CPU

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

@leafstorm
leafstorm / gist:5558628
Created May 11, 2013
Synaptics settings for a Macbook Pro's touchpad.
View gist:5558628
synclient ClickFinger3=2
synclient MaxTapTime=0
synclient MaxDoubleTapTime=0
synclient TapButton1=0
synclient TapButton2=0
synclient TapButton3=0
synclient HorizTwoFingerScroll=1
@leafstorm
leafstorm / gist:4975030
Created Feb 18, 2013
LeafStorm's Relay Chat - my idea for an IRC-like chat system. This does not constitute a spec.
View gist:4975030

LeafStorm's Relay Chat

LRC is a chat protocol based on edn - Clojure's extension of S-expressions. The idea is to have a format that is easily typable and telnettable, but also clearly and consistently structured.

High-Level Overview

@leafstorm
leafstorm / gist:4238078
Created Dec 8, 2012
LUG @ NC State Constitution, Markdownified
View gist:4238078

% Constitution of the Linux Users Group at North Carolina State University % % November 21, 2000

Name and Purpose

This organization shall be known as the Linux Users Group (LUG) at North Carolina State University.

The purpose of this organization is to promote the use and usability of

@leafstorm
leafstorm / gist:4173435
Created Nov 30, 2012
Wolfline Route Naming and Numbering Proposal
View gist:4173435

Wolfline Route Naming and Numbering Proposal

Matthew Frazier, Department of Computer Science

With the new route restructuring proposed by HDR Engineering for the NC State Wolfline service, the Wolfline has an opportunity to rearrange its route names and numbering into a more cleanly organized system.

Demonstration Network

The original draft of this plan used the 10-year Wolfline service plan as proposed by HDR Engineering. However, at the publication of the Wolfline Fall 2012 system map, it became apparent that NC State Transportation did not plan to follow the plan exactly. (Not that I mind.)

@leafstorm
leafstorm / gist:3342583
Created Aug 13, 2012
The LUG @ NC State Brand Book
View gist:3342583

LUG @ NC State Brand Book

This is our totally strict set of guidelines about how to refer to the Linux Users' Group at NC State University, and produce print media about the LUG.

Names

The official, formal name of the LUG is "the Linux Users' Group at North Carolina State University." Never use this except when drafting legal documents.

In situations where a "full" name (but not a legal name) is necessary, use "Linux Users' Group at NC State University." For a shorter name, use "LUG @ NC State."

@leafstorm
leafstorm / gist:2907123
Created Jun 10, 2012
ItemBox, A serialization format I never got around to implementing
View gist:2907123

ItemBox 1.0 draft 1

ItemBox is a binary format for serializing data in a language-independent way, similar to JSON, YAML, BSON, MessagePack, and other formats. ItemBox is specifically designed for encoding and decoding speed, space efficiency, and ease of implementation.

Types Representable

@leafstorm
leafstorm / gist:2323188
Created Apr 6, 2012
PEG.js parser for DCPU-16 assembly language
View gist:2323188
/**
* Parser for DCPU-16 assembly language.
* This parser should accurately parse all of Notch's example code, and most
* of the community's code.
* It converts instructions to objects with fields {op, params, label}.
* op is the lowercased opcode, params is the parameters passed to it (as
* values), and label is the label prefixing the statement (null if the
* statement is unlabelled).
* Values have a type field and one or two others depending on the type.
*
You can’t perform that action at this time.