Skip to content

Instantly share code, notes, and snippets.

View yosshi's full-sized avatar
🦍

Yoshiyuki MIYAGI yosshi

🦍
View GitHub Profile
@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
lsof -P -i -n | cut -f 1 -d " " | uniq
@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 }'`
@yosshi
yosshi / 通堂もやし.md
Last active March 30, 2022 12:24
通堂もやしのつくりかた

通堂もやしの作り方

材料

  • もやし 1袋
  • 味の素・ほんだし 1袋
  • ごま油 適量
  • ラー油 適量
  • 一味唐辛子 適量
  • にんにく 適量
  • 醤油 少々
@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 / irc2mail.rb
Created January 26, 2010 05:44 — forked from naoto/irc2mail.rb
#!/usr/local/bin/ruby
#
require 'sendgmail.rb'
require 'yaml'
@LOG_DIR = "/path/to/log"
@CHANNEL = %w{#xxxxx@freenode #xxxxx@twitter}
@FILE_NAME = Time.now.strftime("%Y.%m.%d.txt")
@KEYWORDS = "key1|key2|key3"
replys = Array.new
@yosshi
yosshi / ラー油
Created January 24, 2010 13:25 — forked from kotatsumikan/ラー油
自宅で作るラー油レシピ
■材料
 ベース油(食用油を模索中、ごま油がベター):欲しい量
 白ネギ(の青い部分):適量
 ニンニク:適量
 唐辛子:適量
 容器:ベース油が入る容積をもった容器
■作成方法
1.ニンニクと白ネギをみじん切りにする。
2.ベース油を鍋に入れる。
#!/bin/sh
for file in $*
do
if [ -f $file ]; then
nkf --utf8 $file > tmpfile
mv tmpfile $file
fi
done
exit
@yosshi
yosshi / clear_emacs_backup_file.sh
Created January 9, 2010 15:14
emacs が生成するバックアップファイルを削除
#!/bin/sh
rm -rf `find ~/ -name "*\~"`
@yosshi
yosshi / getRandomString.rb
Created January 9, 2010 15:12
ランダムな文字列を生成する
# ランダムな文字列を生成する。
# 引数 _length_ を指定すると生成桁数を指定することができます(デフォルト 8 桁)。
def getRandomString (length = 8)
if length == 0
length = 8
end
source=("a".."z").to_a + ("A".."Z").to_a + (0..9).to_a + ["_","-","."]
key=""
length.times{ key+= source[rand(source.size)].to_s }
return key