{path}
はダブルクォートしてはいけない。-i 0:none
の0
(ビデオデバイスのインデックス)は環境によって1
等に変更する- Retinaディスプレイのキャプチャはうまくいかない(キャプチャ全体に倍率設定が必要?)
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 | |
interface Instantiatable | |
{ | |
} | |
class Instantiator | |
{ | |
/** | |
* @template T |
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>; |
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); |
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 |
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" |
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<>(); |
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) |
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); |
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); |
NewerOlder