-
begin_generator
- Called when generation is about to take place.
-
begin_site
- Called when the site is loaded completely. This implies that all the nodes and resources have been identified and are accessible in the site variable.
This file contains 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
get %r|^/github(/.+\.js)$| do | |
require 'net/https' | |
uri = params[:captures].first | |
js = "" | |
github = Net::HTTP.new("raw.github.com", 443) | |
github.use_ssl = true # do not forget this to access with HTTPS protocol | |
github.start do | |
## XXX: verify the http response status |
This file contains 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
# coding: utf-8 | |
import os | |
from os import path | |
import re | |
import shutil | |
from itertools import chain | |
DEFAULT_SEPARATOR = "/" |
This file contains 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
[Desktop Entry] | |
Version=7.4 | |
Type=Application | |
Name=Vi IMproved GUI | |
Exec="<%= HOME %>/local/app/vim/bin/gvim" %f | |
Icon=<%= HOME %>/Pictures/icons/vimconf2013-icon.png | |
Comment=The Ultimate Text Editor | |
Categories=Utility;TextEditor; | |
Terminal=false |
This file contains 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
class PreserveSymlink < Middleman::Extension | |
def initialize(app, options_hash={}, &block) | |
super | |
setup_app! app, options_hash | |
ext = self | |
# callback | |
app.after_build do |builder| | |
ext.source_symlinks.each do |source_symlink_path| | |
target_symlink_path = |
This file contains 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 'yaml' | |
require 'json' | |
require 'pathname' | |
BASEDIR = Pathname(File.expand_path(File.dirname(__FILE__))) | |
CONFPATH = BASEDIR.join("config.yaml") | |
result = {} |
This file contains 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
[ui] | |
username = "" | |
verbose = True | |
[defaults] | |
glog = --color always | |
[pager] | |
pager = LESS='FSRX' less | |
#ignore = version, help, update, serve, record |
This file contains 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
class String | |
def optimize_shebang | |
self.gsub! /^\#(?!\!)/, "#!" | |
end | |
end | |
def filenames | |
Dir.entries("usr/local/bin").delete_if{|f| f=~/(^\.\.?$)|(\.rb$)/} | |
end |
This file contains 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 | |
# coding: utf-8 | |
set -ex | |
# -------------------- | |
VIM_NAME=vim | |
VIM_SRC_DIR="$HOME/local/src/github.com/vim/vim" |