Skip to content

Instantly share code, notes, and snippets.

View bighairydave's full-sized avatar

David Tyler bighairydave

View GitHub Profile
@bighairydave
bighairydave / examples.md
Created November 5, 2023 17:08 — forked from atoponce/examples.md
Three password generators in ZSH

Each generator yields 128-bit security passwords. Each generator can take an optional numeric password to generate that many passwords. They should be placed in your ~/.zshrc. They are not portable across other shells.

gen-monkey-pass generates visually unambiguous random meaningless strings using Crockford's base32. Requires only ZSH:

% gen-monkey-pass 
9cws91tjck93f0xymjn33cjt7m

% gen-monkey-pass 3

@bighairydave
bighairydave / archivegenerator.rb
Last active August 29, 2015 14:22 — forked from nlindley/archivegenerator.rb
Collate Jekyll posts by month and year, and create both archive pages and a monthly XML feed
module Jekyll
class ArchiveGenerator < Generator
safe true
def generate(site)
feeddata = {}
collate_by_month(site.posts).each do |month, posts|
page = ArchivePage.new(site, month, posts)
site.pages << page
feeddata[month] = posts
module Jekyll
class ArchivePage < Page
include Convertible
attr_accessor :site, :pager, :name, :ext, :basename, :dir, :data, :content, :output
# Initialize new ArchivePage
# +site+ is the Site
# +month+ is the month
# +posts+ is the list of posts for the month
<theme>
<!-- Window Style -->
<color id="foreground" red="0" green="0" blue="0" alpha="1.0" />
<color id="background" red="1" green="1" blue="1" alpha="1.0" />
<window foregroundColorID="foreground" backgroundColorID="background" shouldUseHUDScrollers="no" />
<!-- Text View Style -->
<color id="tag" red="0.5" green="0" blue="0.5" alpha="1.0" />
<color id="handle" extendsColorID="foreground" />
<color id="insertionPoint" extendsColorID="foreground" />
/* Uses this image: http://dl.dropbox.com/u/5768678/minecraft-sprites/blocks.png */
.block {
background-image: url('blocks.png');
width: 32px;
height: 32px;
}
#cobblestone { background-position: 0px 0px; }
#stone-bricks-1 { background-position: 0px -32px; }
#lapis-lazuli-block { background-position: 0px -64px; }