This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| PID=`pgrep -f "ffmpeg -f x11grab -s"` | |
| if [ `echo $PID | wc -w` = 1 ]; | |
| then | |
| tput bel | |
| SLOP=$(slop -f "%x %y %w %h %g %i") || exit 1 | |
| read -r X Y W H G ID < <(echo $SLOP) | |
| ffmpeg -f x11grab -s "$W"x"$H" -i :0.0+$X,$Y -f alsa -i pulse -fs 128M ~/Downloads/`date +%4Y-%m-%d_%I-%m-%S`.mp4 | |
| else | |
| tput bel; sleep 0.1; tput bel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ChangeDetectorRef, Pipe, PipeTransform } from '@angular/core'; | |
| import { toPromise } from 'なんかPromiseのライブラリとか'; | |
| /** | |
| * PipeでPromiseを扱うときは、「impureパイプにして内部的に最新の値を持つ」みたいなアプローチを取るらしい。 | |
| * これは「Nullableなstringを受け取って、Promiseで遅延評価した結果を返す」パイプ。 | |
| */ | |
| @Pipe({ name: 'hoge', pure: false }) | |
| export class HogePipe implements PipeTransform { |
OlderNewer