Skip to content

Instantly share code, notes, and snippets.

@saiten
saiten / rec_radiko.sh
Last active December 2, 2021 05:57
簡易radiko録音ツール。要swftools
#!/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
@saiten
saiten / localecompiler.py.patch
Created August 12, 2011 02:51
%1$d,%2$dみたいな置換文字列に対応させる
*** localecompiler.py.orig 2011-08-12 11:43:31.000000000 +0900
--- localecompiler.py 2011-08-12 11:44:00.000000000 +0900
***************
*** 72,77 ****
--- 72,79 ----
pass
value = self.getText(node.childNodes)
# TODO: translate any more symbols?
+ value = re.sub(r'%(\d+)\$d', r'%\1$.0f', value)
+ value = re.sub(r'%(\d+)\$s', r'%\1$@', value)
@saiten
saiten / radiru.txt
Created September 1, 2011 09:02
らじるらじるをrtmpdumpで録音する
# 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
@saiten
saiten / app.coffee
Created September 13, 2011 08:02
TiTestFlight sample
testflight = require 'co.saiten.ti.testflight'
testflight.takeOff '[team token]'
Ti.API.info "start application"
baseWin = Ti.UI.createWindow()
nav = Ti.UI.iPhone.createNavigationGroup()
baseWin.add nav
@saiten
saiten / gist:2348239
Created April 10, 2012 04:00
フォント設定
;; フレームのフォントを設定
(let* ((font-set-name "myfonts")
(size 10) ; ASCIIフォントのサイズ [9/10/12/14/15/17/19/20/...]
(asciifont "Monaco") ; ASCIIフォント
(jpfont "Hiragino Kaku Gothic Pro") ; 日本語フォント
(h (* size 10))
(fontspec (font-spec :family asciifont))
(jp-fontspec (font-spec :family jpfont)))
(set-face-attribute 'default nil :family asciifont :height h)
(set-fontset-font nil 'japanese-jisx0213.2004-1 jp-fontspec)
@saiten
saiten / gist:2428326
Created April 20, 2012 13:02
Simple Light(meekapps/Simple-Light)をiOS4で光らせる
diff --git a/Simple Light/ViewController.h b/Simple Light/ViewController.h
index 21571f3..db2709d 100644
--- a/Simple Light/ViewController.h
+++ b/Simple Light/ViewController.h
@@ -13,6 +13,7 @@
AVCaptureDevice *captureDevice;
AVCaptureSession *captureSession;
+ AVCaptureVideoPreviewLayer *videoPreviewLayer;
@saiten
saiten / code_getter.coffee
Last active December 26, 2015 07:09
destiny公式のアカウントを監視して、ベータコードっぽいものをtweetしたら登録してみるスクリプト
# destiny beta code getter
twitter = require 'ntwitter'
Spooky = require 'spooky'
async = require 'async'
#
# config
#
twitterToken =
Pod::Spec.new do |s|
s.name = 'SSZipArchive'
s.version = '0.3.1'
s.summary = 'Utility class for zipping and unzipping files on iOS and Mac.'
s.description = 'SSZipArchive is a simple utility class for zipping and unzipping files on iOS and Mac.'
s.homepage = 'https://github.com/soffes/ssziparchive'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Sam Soffes' => 'sam@soff.es' }
s.source = { :git => 'https://github.com/soffes/ssziparchive.git', :tag => "v#{s.version}" }
s.ios.deployment_target = '4.0'
@saiten
saiten / GData.podspec
Created May 8, 2014 03:35
GData.podspec
Pod::Spec.new do |s|
s.name = 'GData'
s.version = '1.9.1'
s.license = { :type => 'Apache License, Version 2.0', :file => 'COPYING.txt' }
s.summary = "The Google data APIs provide a simple protocol for reading and "\
"writing data on the web. Many Google services provide a Google data API."
s.homepage = 'https://code.google.com/p/gdata-objectivec-client'
s.author = { 'The Google Data APIs team' => 'https://code.google.com/p/gdata-objectivec-client' }
s.source = { :svn => 'http://gdata-objectivec-client.googlecode.com/svn', :tag => 'gdata-objectivec-client-1.9.1' }
import UIKit
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely()
func postAsync() {
// create the url-request
let urlString = "http://api.search.nicovideo.jp/api/snapshot/"
//let urlString = "http://www.google.com"