Skip to content

Instantly share code, notes, and snippets.

View tmtk75's full-sized avatar

Tomotaka Sakuma tmtk75

View GitHub Profile
@tmtk75
tmtk75 / express-stylus.html
Created May 23, 2012 01:36 — forked from bentruyman/express-stylus.html
Using Stylus Middleware with Express
<!doctype html>
<html lang="en">
<head>
<title>My Web Page</title>
<meta charset="utf-8">
<link href="/stylesheets/main.css" rel="stylesheet">
</head>
<body>
</body>
</html>
{
"chef_server": {
"server_url": "http://localhost:4000",
"webui_enabled": true
},
"yum": { "epel_release": "6-7" },
"run_list": [ "recipe[chef-server::rubygems-install]" ]
}
file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
---
layout: default
---
<head>
{% jumly_includes %}
</head>
<body>
{% jumly sequence %}
@found "You", -> @message "Hello!", "JUMLY"
{% endjumly %}
## Plugin for Jekyll to use JUMLY.
module JUMLY
class Script < Liquid::Block
def initialize(tag_name, markup, tokens)
super
@markup = markup.strip
end
def render(context)
<<SCRIPT.strip
<script type="text/jumly+#{@markup}">#{@nodelist.join ""}</script>
{% jumly sequence %}
@found "You", ->
@message "Hello!", "JUMLY"
{% endjumly %}
{% jumly_includes %}
<link href="http://tmtk75.github.com/jumly-core/jumly-0.1.0-rc1.min.css" type="text/css" rel="stylesheet"/>
<script src='http://code.jquery.com/jquery-1.7.1.min.js' type="text/javascript"></script>
<script src='http://jashkenas.github.com/coffee-script/extras/coffee-script.js' type="text/javascript"></script>
<script src="http://tmtk75.github.com/jumly-core/jumly-0.1.0-rc1.min.js" type="text/javascript"></script>
@tmtk75
tmtk75 / markdown-tag.rb
Created November 30, 2011 08:10
Jekyll Markdown Tag
=begin
Jekyll tag to include Markdown text from _includes directory preprocessing with Liquid.
Usage:
{% markdown <filename> %}
Dependency:
- kramdown
=end
module Jekyll
class MarkdownTag < Liquid::Tag
def initialize(tag_name, text, tokens)
#!/bin/sh
##
## Publish onto Github Pages, providing an easy way to publish.
##
## Prepare: creating gh-pages branch at local and remote.
## $ jekyll
## $ git co -b gh-pages
## $ git ls-files | xargs git rm
## $ mv _site/* .
## $ git add .