Follow these steps to setup AsciiDoc in a Middleman 3 site.
Note
|
Middleman 4 will require the use of the middleman-asciidoc gem.
|
require 'rails/application/route_inspector' | |
all_routes = Rails.application.routes.routes.select { |r| r.defaults[:controller] =~ /api\/v1/ } | |
inspector = Rails::Application::RouteInspector.new | |
pp inspector.format(all_routes, 'api/v1/inboxes').map { |x| x.split(' ') } | |
# [["api_v1_inbox", | |
# "POST", | |
# "/api/v1/inboxes/:id(.:format)", | |
# "api/v1/inboxes#update"], | |
# ["api_v1_inboxes", |
require 'forwardable' | |
module RtmpMeta | |
class Parser | |
PATTERN = /duration\s+(?<duration>\d+\.?\d+)$/ | |
attr_reader :raw_data | |
def initialize raw_data | |
@raw_data = raw_data | |
end |
#config/initializers/airbrake.rb | |
Airbrake.configure do |config| | |
config.api_key = 'mySecretKeyGoesHere' | |
config.ignore << "CustomSidekiqException" #do not report our custom exceptions to Airbrake | |
end |
module WillPaginate | |
module ActionView | |
def will_paginate(collection = nil, options = {}) | |
options[:renderer] ||= FoundationLinkRenderer | |
super.try :html_safe | |
end | |
class FoundationLinkRenderer < LinkRenderer | |
protected |
bindkey '^R' history-incremental-pattern-search-backward | |
HISTSIZE=100000 | |
SAVEHIST=100000 | |
setopt hist_ignore_all_dups | |
setopt inc_append_history extendedglob share_history | |
. /etc/profile.d/autojump.zsh |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>OnDemand</key> | |
<false/> | |
<key>KeepAlive</key> | |
<true/> | |
#!/bin/bash | |
#FIXME Add usage() function to improve documentation | |
# Enable exposure of the specified GPIO pin (0-8) | |
gpio_enable() | |
{ | |
if [[("$1" -lt 0) || ("$1" -gt 8)]] ; then | |
echo "Valid pins are 0-8" | |
return -1; | |
fi |
package main | |
import ( | |
"flag" | |
"fmt" | |
"net/http" | |
"github.com/codegangsta/martini" | |
"github.com/garyburd/redigo/redis" | |
"github.com/martini-contrib/render" |
property baseURL : "http://statusboard.dev/song?" | |
if application "Spotify" is running then | |
tell application "Spotify" | |
set theTrack to name of the current track | |
set theArtist to artist of the current track | |
set theAlbum to album of the current track | |
set theurl to spotify url of the current track | |
try | |
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\"" |