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
# Rake convert:erb2:slim converts every ERB files under `/app/views/**`. | |
# Original ERB files will be kept otherwise `delete` option is passed like: | |
# `$ rake "convert:erb2:slim[delete]"` . | |
namespace :convert do | |
namespace :erb2 do | |
ERBS = FileList["#{Rails.root}/app/views/**/*.erb"] | |
### Slim | |
require 'html2slim' | |
# generate tasks for slim files |
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
<% all_methods = self.class.superclass.instance_methods - self.class.superclass.superclass.instance_methods %> | |
<% output_helpers = ::Padrino::Helpers::OutputHelpers.instance_methods %> | |
<% tag_helpers = ::Padrino::Helpers::TagHelpers.instance_methods %> | |
<% asset_tag_helpers = ::Padrino::Helpers::AssetTagHelpers.instance_methods %> | |
<% form_helpers = ::Padrino::Helpers::FormHelpers.instance_methods %> | |
<% render_helpers = ::Padrino::Helpers::RenderHelpers.instance_methods %> | |
<% number_helpers = ::Padrino::Helpers::NumberHelpers.instance_methods %> | |
<% blog_helpers = Middleman::Blog::Helpers.instance_methods %> | |
<% mm_methods = all_methods - output_helpers - tag_helpers - asset_tag_helpers - form_helpers - render_helpers - number_helpers %> |
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
// Compile with: | |
// http://subsimple.com/bookmarklets/jsbuilder.htm | |
(function(w) { | |
var r, i, u, t, | |
l = document.getElementsByTagName('link'), | |
ll = l.length; | |
for(i=0; i<ll; i++) { | |
if(l[i].getAttribute('rel') === 'alternate' |
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
カレーのレシピ | |
誰でもできる、美味しいカレーの作り方です。旦那も息子もこのカレーが大好物。 | |
ポイントは玉ねぎと人参はミキサーで細かくしてしまうところ。逆にコクのある美味しいカレーになります。 | |
レシピの作者 | |
山田サチ子さん | |
材料 ( 8皿分 ) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "wheezy" |
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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.1' | |
# Use sqlite3 as the database for Active Record | |
gem 'sqlite3' | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 4.0.0' |
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
diff --git a/docs/bifs.md b/docs/bifs.md | |
index 57a6c5c..9f420ad 100644 | |
--- a/docs/bifs.md | |
+++ b/docs/bifs.md | |
@@ -19,7 +19,7 @@ Return the green component of the given `color`. | |
Return the blue component of the given `color`. | |
- red(#00c) | |
+ blue(#00c) |
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 | |
ORIG_DIR='./stylus_orig' | |
CLONE_TO='git clone https://github.com/LearnBoost/stylus.git' | |
LIST_DOCS='git ls-tree --name-only HEAD docs/' | |
LAST_TIME='git log -1 --pretty=format:%ct' | |
LAST_TIME_F='git log -1 --pretty=format:%cr' | |
DEV=false | |
${CLONE_TO} ${ORIG_DIR} > /dev/null 2>&1 |
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
# put in scripts/shinchoku.coffee | |
# add "tumblr": "~0.4.0" on package.json -> "dependencies" | |
tumblr = require 'tumblr' | |
util = require 'util' | |
auth = | |
# Set these on environment variables | |
consumer_key: process.env['TUMBLR_CONSUMER_KEY'] | |
consumer_secret: process.env['TUBMLR_CONSUMER_SECRET'] | |
token: process.env['TUMBLR_TOKEN'] |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |