An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| #!/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 |
| #!/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 に置く |
| 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 |
| 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 |
| # 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 |
| ## 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 |
| source 'http://rubygems.org' | |
| gem 'sunzi' | |
| gem 'rake' | |
| gem 'fog' |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| #!/bin/bash | |
| #shows traffic on the specified device | |
| function human_readable { | |
| VALUE=$1 | |
| BIGGIFIERS=( B K M G ) | |
| CURRENT_BIGGIFIER=0 | |
| while [ $VALUE -gt 10000 ] ;do | |
| VALUE=$(($VALUE/1000)) |