Skip to content

Instantly share code, notes, and snippets.

View steveh's full-sized avatar

Steve Hoeksema steveh

View GitHub Profile
json = <<-EOF
{
"total_entries": 1,
"_embedded": {
"services": [{
"id": 49487
}]
}
}
EOF
@steveh
steveh / etc-samba-smb.conf
Created May 12, 2014 07:30
Samba dfree and zfs on Ubuntu 14.04
# File: /etc/samba/smb.conf
dfree command = /usr/local/bin/dfree
@steveh
steveh / README.md
Last active August 29, 2015 14:00
PHP media query combiner

INSTALLATION

  1. Save script to e.g. /usr/local/bin/media-query-combiner
  2. chmod +x /usr/local/bin/media-query-combiner

USAGE

Reads from stdin and writes to stdout.

@steveh
steveh / allthethings.sh
Last active August 29, 2015 13:56
All the things
#!/bin/sh
# Installation: save to /usr/local/bin/allthethings
# and chmod +x /usr/local/bin/allthethings
# Usage: allthethings update
# allthethings install
if [ -f "Gemfile" ]; then
echo "bundler"
source "https://rubygems.org"
# Rails
gem "rails"
gem "cache_digests"
gem "rake"
# PostgreSQL
gem "pg"
gem "pg_search"
$text_alignment_types: (C center) (L left) (R right);
$vertical_alignment_types: (T top) (M middle) (B bottom);
@each $text_alignment_type in $text_alignment_types {
.txt#{nth($text_alignment_type, 1)},
table .txt#{nth($text_alignment_type, 1)},
table tr .txt#{nth($text_alignment_type, 1)} {
text-align: #{nth($text_alignment_type, 2)};
}
}
#!/usr/bin/env ruby
fn = ARGV[0]
if !fn
puts "Usage: #{$0} file.mustache"
puts
exit
end
/usr/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:341:in `pull'
/usr/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:22:in `parse'
/usr/lib/ruby/1.9.1/rexml/document.rb:230:in `build'
/usr/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize'
[GEM_ROOT]/gems/activesupport-3.2.6/lib/active_support/xml_mini/rexml.rb:30:in `new'
[GEM_ROOT]/gems/activesupport-3.2.6/lib/active_support/xml_mini/rexml.rb:30:in `parse'
[GEM_ROOT]/gems/activesupport-3.2.6/lib/active_support/xml_mini.rb:80:in `parse'
[GEM_ROOT]/gems/activesupport-3.2.6/lib/active_support/core_ext/hash/conversions.rb:90:in `from_xml'
[GEM_ROOT]/gems/actionpack-3.2.6/lib/action_dispatch/middleware/params_parser.rb:41:in `parse_formatted_parameters'
[GEM_ROOT]/gems/actionpack-3.2.6/lib/action_dispatch/middleware/params_parser.rb:17:in `call'
{
"recipes":[
"ack",
"aspell",
"byobu",
"curl",
"deluged",
"dig",
"dos2unix",
"encfs",
<%= link_to "Admin", main_app.admin_path %>
I'm expecting main_app.admin_path to return /admin, but it returns /store/admin. Using it outside a cell, i.e. in just a partial, it works as expected.