An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
source 'http://rubygems.org' | |
gem 'sunzi' | |
gem 'rake' | |
gem 'fog' |
## DNS | |
@dns = Fog::DNS.new(:provider => 'Linode', :linode_api_key => LINODE_KEY) | |
if @zone = @dns.zones.all.find { |z| z.domain == ZONE } | |
puts "Found zone #{@zone.inspect}" | |
else | |
@zone = @dns.zones.create(:domain => ZONE, :email => ZONE_EMAIL) | |
puts "Creating zone #{@zone.inspect}" | |
end |
# RTMPEのtype9 handshakeに対応している必要があるのでRTMPDump v2.4必須 | |
# CentOS5 32bitのさくらVPS、OSX Lionで動作確認。(OSX LionではRTMPDumpを32bitでビルド) | |
# ラジオ第1 | |
rtmpdump --rtmp "rtmpe://netradio-r1-flash.nhk.jp" \ | |
--playpath 'NetRadio_R1_flash@63346' \ | |
--app "live" \ | |
-W http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf \ | |
--live \ | |
-o r1.m4a |
00 01 * * * /bin/bash --login -c 'cd <your app> && RAILS_ENV=production /usr/bin/env bundle exec rake <your rake>' >> /var/log/<your app>.log 2>&1 |
BEGIN:VCALENDAR | |
PRODID:-//Google Inc//Google Calendar 70.9054//EN | |
VERSION:2.0 | |
METHOD:PUBLISH | |
BEGIN:VTIMEZONE | |
TZID:Asia/Tokyo | |
BEGIN:STANDARD | |
TZOFFSETFROM:+0900 | |
TZOFFSETTO:+0900 | |
TZNAME:JST |
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# 英辞郎が提供する txt ファイルを Stardict が読める .tab 形式に変換する | |
# iconv の Shift_jis -> Utf-8 変換はうまくないみたいなので、nkf を使いましょう。 | |
# cat EIJI-129.TXT | nkf -w8Lu | ./mkstardicttab > eijirou.tab | |
# 最終的には stardict-tools の tabfile を使って | |
# /usr/lib/stardict-tools/tabfile eijirou.tab | |
# としてできたファイルを /usr/share/stardict/dic に置く |
#!/bin/sh | |
playerurl=http://radiko.jp/apps/js/flash/myplayer-release.swf | |
cookiefile=./cookie.txt | |
playerfile=./player.swf | |
keyfile=./authkey.png | |
if [ $# -eq 1 ]; then | |
channel=$1 | |
output=./$1.flv |