Skip to content

Instantly share code, notes, and snippets.

View bigsweater's full-sized avatar

Vincent Maglione bigsweater

View GitHub Profile
@bigsweater
bigsweater / gist:6677128
Last active December 23, 2015 18:39
syntaxerror from my markdown helper
SyntaxError: d:/work/Dropbox/Work Sync/bsd/site/mm/source/about.html.erb:2: syntax error, unexpected ')'
; @_out_buf.concat(( md do ).to_s)
^
d:/work/Dropbox/Work Sync/bsd/site/mm/source/about.html.erb:66: syntax error, unexpected keyword_ensure, e
xpecting ')'
d:/work/Dropbox/Work Sync/bsd/site/mm/source/about.html.erb:68: syntax error, unexpected keyword_end, expe
cting ')'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-1.3.7/lib/tilt/template.rb:227:in `class_eval'
c:/Ruby200/lib/ruby/gems/2.0.0/gems/tilt-1.3.7/lib/tilt/template.rb:227:in `compile_template_metho
d'
@bigsweater
bigsweater / mderb.rb
Created September 21, 2013 06:41
A Middleman helper that creates a `<% markdown do %>` method to parse markdown text inside ERb templates, so you can use markdown for content and ERb for layout in the same file. (Similar to the :markdown HAML method.)
module MD
def renderer
Redcarpet::Render::HTML.new(
:no_intra_emphasis => true,
:tables => true,
:fenced_code_blocks => true,
:disable_indented_code_blocks => true,
:autolink => true,
:filter_html => false,
:with_toc_data => true
@bigsweater
bigsweater / post_receive
Created August 22, 2013 18:51
This is a post-receive file for use with your own private git server. Say you wanna deploy using git, but you have multiple branches that you want to deploy to multiple places. For instance, you have a 'dev' branch that should only deploy to dev.yoursite.com, and a 'master' branch that will only deploy to yoursite.com. Once you git init into the…
#!/bin/bash
while read oldrev newrev ref
do
branch=`echo $ref | cut -d/ -f3`
if [ "master" == "$branch" ]; then
GIT_WORK_TREE=/path/to/your/live/deployment/ git checkout -f $branch
echo 'Changes pushed live.'
fi

Contract Killer 3

Revised date: 08/14/2013

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.