Skip to content

Instantly share code, notes, and snippets.

View yosshi's full-sized avatar
🦍

Yoshiyuki MIYAGI yosshi

🦍
View GitHub Profile
@yosshi
yosshi / iTunesSleepTimer.scpt
Created January 26, 2010 15:31
iTunes を指定時間で停止させるAppleScript
-- AppleScript
-- iTunesSleepTimer
display dialog "Stop iTunes after input minutes:" default answer "30"
set res to result
if button returned of res is "OK" then
set sec to (text returned of res) * 60
set curDate to current date
set time of curDate to (time of curDate) + sec
display dialog "iTunes will stop at " & time string of curDate buttons {"Stop Now"} giving up after sec
@yosshi
yosshi / 通堂もやし.md
Last active March 30, 2022 12:24
通堂もやしのつくりかた

通堂もやしの作り方

材料

  • もやし 1袋
  • 味の素・ほんだし 1袋
  • ごま油 適量
  • ラー油 適量
  • 一味唐辛子 適量
  • にんにく 適量
  • 醤油 少々
@yosshi
yosshi / gist:314836
Created February 25, 2010 18:08
tiarra で吐いている log を tail
tail -f /Applications/tiarra/log/\#Twitter@tig/`ls -l /Applications/tiarra/log/\#Twitter@tig | tail -n 1 | awk '{ print $9 }'`
lsof -P -i -n | cut -f 1 -d " " | uniq
@yosshi
yosshi / gist:315425
Created February 26, 2010 04:59
FFmpeg のオプションは要注意やで。
ffmpeg -ss 20 -i ./video.flv -vframes 1 -f image2 ./out.jpg 0.06s user 0.04s system 52% cpu 0.192 total
ffmpeg -i ./video.flv -ss 20 -vframes 1 -f image2 ./out.jpg 0.37s user 0.41s system 87% cpu 0.883 total
@yosshi
yosshi / twitter_reverse_post.rb
Created October 19, 2010 07:20
コマンドラインで入力された文字を単純に逆さにして送信。
$KCODE='u'
require 'rubygems'
require 'twitter'
chars = ARGV[0].scan(/./)
TWITTER_USER=''
TWITTER_PASS=''
status = chars.reverse.join
@yosshi
yosshi / chrome
Created August 19, 2011 11:49
User-agent を指定してGoogle Chromeを起動するシェルスクリプト(mac)
#!/bin/bash
# user agent
IPHONE='Mozilla/5.0 (iPhone Simulator; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7'
XPERIA="Mozilla/5.0 (Linux; U; Android 1.6; ja-jp; SonyEricssonSO-01B Build/R1EA018) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1"
IS04="Mozilla/5.0 (Linux; U; Android 2.1-update1; ja-jp; IS04 Build/FEK100) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"
ANDROID=$IS04
EZWEB="KDDI-XX99 UP.Browser/6.2_7.2.7.1.K.8.400 (GUI) MMP/2.0"
GALAXY="Mozilla/5.0 (Linux; U; Android 2.3.3; ja-jp; SC-02B Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"
@yosshi
yosshi / gist:1185237
Created September 1, 2011 01:59
Emacs 24 for OSX Lion install 手順
# 後で整理する
git pull
./autogen.sh
./configure --with-ns --without-x
make
make install
cp -r ./nextstep/Emacs.app /Applications/Emacs24.app
@yosshi
yosshi / ffmpeg_baisoku.sh
Created June 5, 2012 01:24
ffmepg で X倍速再生動画を作成剃る方法。とりあえず3倍速
!#/bin/sh
ffmpeg -i IMGP8692.AVI -s 1280x720 -r 10.1 hoge.yuv
ffmpeg -s 1280x720 -r 29.97 -i hoge.yuv hoge.mp4
@yosshi
yosshi / id333903271.html
Created October 3, 2012 09:58
Mobile Safari で mobile.twitter.com にアクセスすると、アプリのリンクが出る。そのソースコード
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="keywords" content="iTunes Store" /><meta name="description" content="iTunes Store" /><meta name="viewport" content="width = device-width, initial-scale = 1, minimum-scale = 1, maximum-scale = 1, user-scalable = no" /><meta name="platform-cache-id" content="16" />
<title></title>