Skip to content

Instantly share code, notes, and snippets.

View chipotle's full-sized avatar

Watts Martin chipotle

View GitHub Profile
@chipotle
chipotle / mdsplit.rb
Created May 12, 2022 15:53
Ruby script to split one file into multiple files, using Markdown h1 headers
#!/usr/bin/env ruby
if ARGV.empty?
puts "Usage: #{__FILE__} filename [directory]\n\n"
puts "The file 'filename' will be split at each Markdown h1 ('# ') header. If"
puts "'directory' is specified, it will be used as the output directory."
puts "Otherwise files will be written to the current directory.\n\n"
exit(2)
end
#!/bin/bash
format=${1:-markdown_github}
exec pandoc -f $format -t ~/bin/bbcode.lua
@chipotle
chipotle / deploy.rb
Last active February 8, 2018 18:54
Capistrano deployment script for Laravel 4
# Capistrano Laravel 4 Deployment Tasks
# Watts Martin (layotl at gmail com)
# https://gist.github.com/chipotle/5506641
# updated 14-Aug-2013
# Assumptions:
#
# - You are using a .gitignore similar to Laravel's default, so your
# vendor directory and composer(.phar) are *not* under version control
# - Composer is installed as an executable at /usr/local/bin/composer