Skip to content

Instantly share code, notes, and snippets.

$base-color: #f2eff0
$main-color: #333333
$accent-color: #1e965c
$base-text-color: darken($base-color, 50%)
# encoding: utf-8
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
sudo apt-get remove vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install luajit libluajit-5.1 libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev mercurial
cd /usr/bin
sudo ln -s luajit-2.0.0-beta9 luajit
cd ~

https://github.com/mojombo/jekyll/wiki/Plugins

Jekyllプラグインシステムのフックは、あなたのサイト向けに特化したコンテンツの生成を可能にします。Jekyllのソースを修正することなく、あなたのサイト用のコードを実行できます。

The Jekyll plugin system hooks allow you to create custom generated content specific to your site. You can run custom code for your site without having to modify the Jekyll source itself.

プラグインのインストール

h2. Installing a plugin

def ping(ip)
r = Regexp.new('[1-9]\d* (packets )?received')
result = r.match(`ping -c 1 -W 1 #{ip}`)
result != nil
end
def arp(ip)
r = Regexp.new('[0-f]+:[0-f]+:[0-f]+:[0-f]+:[0-f]+:[0-f]+')
result = r.match(`arp -n #{ip}`)
result ? result.to_s : nil
require 'spec_helper'
describe "todos/show" do
before(:each) do
@todo = assign(:todo, stub_model(Todo,
:title => "Title",
:done => false
))
end
require 'spec_helper'
describe "todos/new" do
before(:each) do
assign(:todo, stub_model(Todo,
:title => "MyString",
:done => false
).as_new_record)
end
require 'spec_helper'
describe "todos/index" do
before(:each) do
assign(:todos, [
stub_model(Todo,
:title => "Title",
:done => false
),
stub_model(Todo,
require 'spec_helper'
describe "todos/edit" do
before(:each) do
@todo = assign(:todo, stub_model(Todo,
:title => "MyString",
:done => false
))
end
require "spec_helper"
describe TodosController do
describe "routing" do
it "routes to #index" do
get("/todos").should route_to("todos#index")
end
it "routes to #new" do