Skip to content

Instantly share code, notes, and snippets.

@shiwork
shiwork / gist:5562220
Last active December 17, 2015 05:59
foltiaのエンコードプロセスが12000秒超えている場合に殺す
for i in `ps aux | egrep 'ffmpeg|mplayer' | grep foltia | gawk '{print $2}'`
do
TIME=`ps -o lstart --noheader -p $i`;
START=`date +%s -d "$TIME"`;
NOW=`date +%s`;
PASSTIME=`expr $NOW - $START`;
if [ $PASSTIME -gt 12000 ]; then
kill $i;
echo "kill $i at "`date`;
@shiwork
shiwork / gist:5792786
Created June 16, 2013 17:41
検索条件とrename
find ./ -mtime +10 -name "*.m2t" -print0 | xargs -0 -I% rename .m2t .ts %
@shiwork
shiwork / gist:5792795
Created June 16, 2013 17:45
foltia ANIME LOCKERでTSの保存拡張子をtsに変更する差分 foltia ANIME LOCKER v3.0.2
diff --git a/perl/captureimagemaker.pl b/perl/captureimagemaker.pl
index 384e979..47a6d4d 100755
--- a/perl/captureimagemaker.pl
+++ b/perl/captureimagemaker.pl
@@ -117,7 +117,7 @@ unless (-e $capimgdirname ){
# キャプチャ入れるディレクトリ作成
# $captureimgdir = "$tid"."-"."$countno"."-"."$date"."-"."$time";
$captureimgdir = $filename;
-$captureimgdir =~ s/\.m2p$|\.m2t$|\.m2v$//;
+$captureimgdir =~ s/\.m2p$|\.m2t$|\.ts$|\.m2v$//;
@shiwork
shiwork / gist:6276818
Created August 20, 2013 03:30
艦これ用Fluid UserStyle
/* your source here */
.mg-t20 {display:none !important;}
#main-ntg .area-pickupgame {display:none;}
#foot {display:none;}
@shiwork
shiwork / FileReflector.php
Last active December 27, 2015 13:29
phpDocumentor2で日本語が扱えない問題の修正。 対象のファイルの文字コードに合わせて変換したいが、php.iniのlanguageやらmb_languageに依存するみたい。
/**
* Opens the file and retrieves its contents.
*
* During construction the given file is checked whether it is readable and
* if the $validate argument is true a PHP Lint action is executed to
* check whether the there are no parse errors.
*
* By default the Lint check is disabled because of the performance hit
* introduced by this action.
*
@shiwork
shiwork / gist:8519597
Last active January 3, 2016 21:09
木戸衣吹ちゃんのマガジン読書会
@shiwork
shiwork / gist:8563016
Created January 22, 2014 17:24
tsファイルまとめて削除
find ./ -mtime +10 -name "*.ts" -type f -maxdepth 1 | xargs
@shiwork
shiwork / gist:8563093
Created January 22, 2014 17:28
tsファイルまとめて削除
find ./ -mtime +10 -name "*.ts" -type f -maxdepth 1 | xargs rm
@shiwork
shiwork / git_config.md
Last active August 29, 2015 13:56
Subversionからgitへ移行する時

Subsonicにちょっと手を加えたかったのでsvnからgitに移し替えた。

git2svnについては未だ特に方法は調べてないが、とりあえずコレでSVNの修正は取得できてるっぽい。

[svn-remote "svn"]
    noMetadata = 1
    url = http://svn.code.sf.net/p/subsonic/code
    fetch = trunk:refs/heads/svn/trunk
 branches = branches/*:refs/heads/svn/*
module Hoge {
export class Sample {
constructor() {
}
methodA():void {
alert('methodA');
}