あまり深く理解してないので識者のツッコミ大歓迎
取り敢えず最低限だけ
# 補完を有効にする
#!/usr/bin/env ruby -wKU | |
# | |
# by Kelan Champagne | |
# http://yeahrightkeller.com | |
# | |
# A script to generate a personal podcast feed, hosted on Dropbox | |
# | |
# Inspired by http://hints.macworld.com/article.php?story=20100421153627718 | |
# | |
# Simply put this, and some .mp3 or .m4a files in a sub-dir under your Dropbox |
#!/bin/zsh | |
[ -z $1 ] && exit -1 | |
nakatoji_sequence(){ | |
last=$((4 * $1)) | |
for i in {1..$1} ; do | |
echo -n "$(($last - $i * 2 + 2)),$(($i * 2 - 1))," | |
echo -n "$(($i * 2)),$((1 + $last - $i * 2))," | |
done | sed "s/,$//g" | |
} | |
file=$(echo $1 | sed "s/\.pdf$//g") |
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
AGQR の放送を保存するスクリプト.
というバグが存在する.