Skip to content

Instantly share code, notes, and snippets.

@rhizome
rhizome / raid_resize.sh
Last active February 13, 2021 05:38
Resizing a RAID 1 mirror on Debian with mdadm, fdisk, and resize2fs
# Logical Structure:
# +-----------------------------------+
# | +--------------------------+ |
# | | +------------+ | |
# | RAID | Partition | Filesystem | | |
# | | +------------+ | |
# | +--------------------------+ |
# +-----------------------------------+
# unmount RAID
@rhizome
rhizome / geturls.rb
Created July 31, 2012 04:32
Retrieve a list of all URLs within a site's pages
#!/usr/bin/env ruby
require 'anemone'
require 'pp'
require 'optparse'
options = OpenStruct.new
OptionParser.new do |o|
o.banner = "geturls.rb [options] URL"
<%= content_tag :li, link_to_unless_current( "#{cat.titleize}", polymorphic_path([@user,cat.to_sym]) ) {
link_to("#{cat.titleize}", polymorphic_path([@user,cat.to_sym])) }, :class=>(controller_name.to_s == cat.to_s && action_name == "index") && "current"
-%>