Skip to content

Instantly share code, notes, and snippets.

View garrett's full-sized avatar
🏠
Working from home, as usual 😉

Garrett LeSage garrett

🏠
Working from home, as usual 😉
View GitHub Profile
@garrett
garrett / fedora-home-server.md
Last active September 22, 2022 01:18
Fedora home server

Fedora Home Server

Basic idea

Make it very easy for anyone (even non-techy people) to set up a low-power, inexpensive home server with a Raspberry Pi 2* using Fedora.

* (possibly others later — start small, scale up)

Benefits

@garrett
garrett / discover-jetdirect.sh
Last active August 29, 2015 14:15
discover local jetdirect printer IP addresses
#!/bin/sh
#
# A short script to discover HP JetDirect-enabled printers on your local network
#
# Requires: nmap, route, awk, grep
#
# On Fedora/RHEL/CentOS, you can install dependencies with:
# sudo yum install -y nmap net-tools curl gawk
#
# (Most of these commands will most likely be already installed.)
@garrett
garrett / software-teams-design.md
Last active August 29, 2015 14:14
what software development teams should know about design
  1. programmers and managers need to fully embrace design — without "buy-in", designing is futile (as it'll never get implemented properly — or, in many cases, implemented at all)
  2. design is an iterative process where everyone is involved — not just a designer
  3. design needs to be present at all stages of the project cycle: before, during, and after
  4. design isn't just eyecandy; functionality is even more important (text/content is part of design too)
  5. designers should be treated as full team members, not some add-on
  6. design issues should have high priority too (if something is unusable or even sometimes looks unusable, then people can't use the software)
  7. designers are developers too (in fact, anyone who contributes to making software is a developer — not just programmers)
  8. good software requires design, documentation, project management, community engagement, marketing, etc. — in addition to programming
  9. a lot of designers are quite tech-savvy, but many aren't — regardless, it's okay to not k
@garrett
garrett / mw-export.sh
Created December 13, 2013 17:36
Stupidly simple shell script to export MediaWiki pages (with metadata), as XML
#!/bin/bash
# This uses the mediawiki_cli gem; be sure to have it installed
## Usage
#
# Please pass the URL to your site's wiki prefix to this command, like so:
# sh mw-export.sh "http://wikisite/wiki/"
#
@garrett
garrett / Why carousels are awful.md
Last active February 12, 2018 16:51
Why carousels are awful

Why carousels are awful

This is from a rant of mine on IRC a while back. It has been minimally cleaned up.

  1. tons of interaction issues
  2. if the content changes under the mouse, you click on the wrong thing
  3. timing is either too long or too short
  4. often not accessible
  5. everything but the first is not important, as it's often not seen
  6. obscures content by default
@garrett
garrett / _navbar.haml
Last active December 24, 2015 09:29
middleman navbar from yaml
-# If data_source isn't specified in locals, then default to "navigation"
-#
-# Example for custom data_source:
-#
-# = partial :navbar, locals: { data_source: "navigation" }
-#
- data_source ||= "navigation"
-# Additional classes are also supported on the navbar
-#
@garrett
garrett / map.geojson
Created August 13, 2013 16:25
via:geojson.io
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@garrett
garrett / Show Containing Folder.sh
Last active December 19, 2015 16:19
Quickly open the folder of a file (great for searches) using this script. Put this very simple bash script in your Nautilus scripts folder (~/.local/share/nautilus/scripts/) Right click, go to scripts, then "Show Containing Folder" to open a Nautilus window for things like search results, so you can figure out where the file came from and see ot…
#!/bin/bash
# Licensed under CC0 / Public Domain
# http://creativecommons.org/publicdomain/zero/1.0/
for i in $NAUTILUS_SCRIPT_SELECTED_URIS; do
nautilus $i;
done;
@garrett
garrett / LWN-beautifier.css
Last active October 13, 2015 21:20
Linux Weekly News (lwn.net) beautifier
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("lwn.net") {
body {
font-family: source sans pro, helvetica, arial, sans-serif;
}
.Page {
max-width: 60em;
@garrett
garrett / .inputrc
Created July 16, 2012 09:33
My super-useful ~/.inputrc
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word