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
// ==UserScript== | |
// @name 5ch Browser | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0.0 | |
// @description 簡易5chブラウザ(NG設定、サムネイル表示) | |
// @author shiguruikai | |
// @match *://*.5ch.net/test/* | |
// @match *://*.5ch.sc/test/* | |
// @match *://*.bbspink.com/test/* | |
// @grant none |
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 | |
class EncryptionUtil | |
{ | |
/** | |
* 文字列を暗号化して、Base64エンコードされた暗号文を返します。 | |
* 暗号方式はAES-256-CBC、鍵導出関数はPBKDF2を使用します。次のコマンドと同様です。 | |
* | |
* echo '$plaintext' | openssl aes-256-cbc -pbkdf2 -a -e -k '$password' -iter $iterations -md $digest_method | |
* |
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
function diffc( | |
[Parameter(Mandatory)] | |
[string] | |
$FileA, | |
[Parameter(Mandatory)] | |
[string] | |
$FileB | |
) { | |
Write-Host "--- $(Convert-Path $FileA)" | |
Write-Host "+++ $(Convert-Path $FileB)" |
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
function Format-Bytes { | |
[OutputType([string])] | |
[CmdletBinding()] | |
param ( | |
[Parameter(Position = 0, Mandatory, ValueFromPipeline)] | |
[long] $Value, | |
[Parameter(Position = 1)] | |
[int] $DecimalPlaces = 1 | |
) | |
if ($DecimalPlaces -lt 0) { |
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
[OutputType([System.IO.FileSystemInfo])] # +Property(Bytes, HumanBytes) | |
[CmdletBinding( | |
DefaultParameterSetName = "Path" | |
)] | |
param ( | |
[Parameter( | |
Position = 0, | |
ValueFromPipeline, | |
ParameterSetName = "FileSystemInfo")] | |
[ValidateNotNullOrEmpty()] |
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
[CmdletBinding(DefaultParameterSetName = "default")] | |
param ( | |
[Parameter(Mandatory = $true, Position = 0)] | |
[Parameter(ParameterSetName = "default")] | |
[alias("l")] | |
[string] $LeftPath, | |
[Parameter(Mandatory = $true, Position = 1)] | |
[Parameter(ParameterSetName = "default")] | |
[alias("r")] |
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.io.File; | |
import java.io.IOException; | |
import java.nio.file.FileVisitOption; | |
import java.nio.file.FileVisitResult; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.nio.file.SimpleFileVisitor; | |
import java.nio.file.StandardOpenOption; | |
import java.nio.file.attribute.BasicFileAttributes; |
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.util.Objects; | |
import java.util.function.Supplier; | |
public final class Lazy<T> implements Supplier<T> { | |
private volatile Supplier<T> initializer; | |
private volatile T value; | |
private Lazy(Supplier<T> initializer) { | |
this.initializer = initializer; |
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.util.function.IntPredicate; | |
public final class StringUtils { | |
private StringUtils() {} | |
public static boolean isNullOrEmpty(String string) { | |
return string == null || string.isEmpty(); | |
} | |
private static boolean isCamelCaseDelimiter(int c) { |
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.util.Arrays; | |
import java.util.Scanner; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
public class ParallelExecutor { | |
public static void main(String[] args) { |
OlderNewer