{path}
はダブルクォートしてはいけない。-i 0:none
の0
(ビデオデバイスのインデックス)は環境によって1
等に変更する- Retinaディスプレイのキャプチャはうまくいかない(キャプチャ全体に倍率設定が必要?)
View index.ts
This file contains 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 "reflect-metadata"; | |
import { EventEmitter } from "events"; | |
import { fromEvent, interval, Observable, Subject, Subscription } from "rxjs"; | |
import { take, throttle } from "rxjs/operators"; | |
import { container, instanceCachingFactory } from "tsyringe"; | |
class Throttling<T> { | |
private subscription: Subscription; | |
private subject: Subject<T>; |
View japanese-era.php
This file contains 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
<?php | |
$s = "\u{337E} \u{337D} \u{337C} \u{337B} \u{32FF}\n"; | |
echo $s; | |
echo Normalizer::normalize($s, Normalizer::FORM_KC); |
View clock.go
This file contains 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
package clock | |
import ( | |
"flag" | |
"time" | |
) | |
type NowFunc func() time.Time | |
var nowFunc NowFunc |
View manifest.json
This file contains 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
{ | |
"name": "Tiny Proxy Configurator", | |
"version": "1.0", | |
"description": "A tiny and simple proxy configurator.", | |
"permissions": [ | |
"proxy" | |
], | |
"background": { | |
"scripts": [ | |
"pac.js" |
View Calculator.java
This file contains 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 java.math.BigInteger; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
public class Calculator { | |
private static final int[] RANKING_RATE_MAGIC_NUMBERS = | |
{8931, 1201, 1156, 5061, 4569, 4732, 3779, 4568, 5695, 4619, 4912, 5669, 6586}; | |
public static int detectRateCoefficient(Map<Integer, Long> source) { | |
Set<BigInteger> set = new HashSet<>(); |
View memo.md
View gist:afd839620eb907096d56f901202f9c01
This file contains 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
The following ports are currently installed: | |
apache-ant @1.9.7_0 (active) | |
autoconf @2.69_5 (active) | |
automake @1.15_1 (active) | |
bison @3.0.4_1 (active) | |
bison-runtime @3.0.4_0 (active) | |
bzip2 @1.0.6_0 (active) | |
cctools @886_6+llvm38 (active) | |
cmake @3.7.1_0 (active) | |
colordiff @1.0.16_0 (active) |
View aggr.php
This file contains 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
#!/usr/bin/env php | |
<?php | |
/** | |
* Usage: | |
* php aggr.php < 資材ログ.csv > out.csv | |
* nkf -Ws -Lw out.csv > 資材ログ.csv | |
*/ | |
$src = 'php://filter/read=convert.iconv.cp932%2Futf-8/resource=php://stdin'; | |
$file = new SplFileObject($src); |
View change_fill_color.php
This file contains 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
<?php | |
// usage: php change_fill_color.php '#cafe00' < in.png > out.png | |
$color = $_SERVER['argv'][1]; | |
$in = new Imagick(); | |
$in->readImageFile(STDIN); | |
$size = $in->getImageGeometry(); | |
$out = new Imagick(); | |
$out->newImage($size['width'], $size['height'], $color); |
View file0.java
This file contains 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
public interface UploadService { | |
@Multipart | |
@POST("/upload") | |
Observable<Response> upload(@Part("file") TypedFile file); | |
} |
NewerOlder