- Download the zip
- Open the zip
- Double click Mustache.tmbundle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ruby -e 'exit' | |
| $ echo $? | |
| 0 | |
| $ ruby -e 'exit 1' | |
| $ echo $? | |
| 1 | |
| $ ruby -e 'abort "oh no"' | |
| oh no | |
| $ echo $? | |
| 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # Usage: gemspec [-s] GEMNAME | |
| # | |
| # Prints a basic gemspec for GEMNAME based on your git-config info. | |
| # If -s is passed, saves it as a GEMNAME.gemspec in the current | |
| # directory. Otherwise prints to standard output. | |
| # | |
| # Once you check this gemspec into your project, releasing a new gem | |
| # is dead simple: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ gem install gem-man | |
| $ gem install mustache | |
| $ gem man mustache | |
| View which manual? | |
| 1. mustache(1) | |
| 2. mustache(5) | |
| > 1 | |
| ( shows manpage ) | |
| $ gem man 1 mustache | |
| ( shows mustache(1) ) |
In your shell:
cd ~/.vim
git clone git://github.com/juvenn/mustache.vim.git
mv mustache.vim/syntax/* syntax/
mv mustache.vim/indent/* indent/
mv mustache.vim/ftdetect/* ftdetect/rm -rf mustache.vim
https://github.com/mustache/emacs
In your shell:
cd ~/.emacs.d/vendor
curl -O https://github.com/mustache/emacs/raw/master/mustache-mode.elIn your Emacs config:
(add-to-list 'load-path "~/.emacs.d/vendor/mustache-mode.el")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'mustache' | |
| class HandleBar < Mustache | |
| def respond_to?(methodname) | |
| methodname = methodname.to_s.split(/\s+/).first | |
| super methodname | |
| end | |
| def method_missing(methodname, *args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'mustache' | |
| class HandleBar < Mustache | |
| def respond_to?(methodname) | |
| methodname = methodname.to_s.split(':').first | |
| super methodname | |
| end | |
| def method_missing(methodname, *args) |
Old way:
$ git checkout -b preandpost_fork_hooks scotttam/preandpost_fork_hooks
Branch preandpost_fork_hooks set up to track remote branch preandpost_fork_hooks from scotttam.
Switched to a new branch 'preandpost_fork_hooks'
New way:
$ git checkout preandpost_fork_hooks
Branch preandpost_fork_hooks set up to track remote branch preandpost_fork_hooks from scotttam.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: vipy <python module>" | |
| exit 1 | |
| fi | |
| MODULE_LOCATION=`python -c "import $1; print $1.__file__.rstrip('c')"` | |
| if [ -z $MODULE_LOCATION ]; then |
