Quick'n'dirty Jekyll plugin for sorted cycle.
Copy sorted_for.rb
to _plugins/
directory of your Jekyll site.
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-script' |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
# change 'table' to a more specific selector when the page will have more than one table | |
find('table').all('tr').map { |row| row.all('th, td').map { |cell| cell.text.strip } } |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
From: Brian Akins < brian@akins.org> | |
To: chef < chef@lists.opscode.com> | |
Subject: [chef] Data bag implementation for chef-solo | |
Date: Tue, 1 Feb 2011 10:42:05 -0500 | |
We often use chef-solo for quick testing, etc. This is our extremely simple implementation of data bags for chef-solo. Add "data_bag_path /some/dir/data_bags" to your solo.rb and add this into your libraries: | |
if Chef::Config[:solo] | |
class Chef | |
module Mixin | |
module Language |
require 'cgi' | |
require 'digest/md5' | |
require 'net/https' | |
require 'uri' | |
module Jekyll | |
class GistTag < Liquid::Tag | |
def initialize(tag_name, text, token) | |
super | |
@text = text |
# Adding a host record. | |
sudo dscl . -create /Hosts/www.example.com ip_address 10.1.2.3 | |
# Removing that same host record. | |
sudo dscl . -delete /Hosts/www.example.com |
require 'chef' | |
require 'chef/node' | |
class Opscode | |
class Backup | |
attr_accessor :backup_dir | |
def initialize(backup_dir, config_file) | |
@backup_dir = backup_dir | |
Chef::Config.from_file(config_file) |
# Our own variable where we deploy this app to | |
deploy_to = "/srv/example.com" | |
current_path = "#{deploy_to}/current" | |
shared_path = "#{deploy_to}/shared" | |
shared_bundler_gems_path = "#{shared_path}/bundler_gems" | |
# See http://unicorn.bogomips.org/Sandbox.html | |
# Helps ensure the correct unicorn_rails is used when upgrading with USR2 | |
Unicorn::HttpServer::START_CTX[0] = "#{shared_bundler_gems_path}/bin/unicorn_rails" |