Skip to content

Instantly share code, notes, and snippets.

View hokkun-dayo's full-sized avatar

Hokuto Kagaya hokkun-dayo

View GitHub Profile
@masa7351
masa7351 / ide_shortcut.md
Last active May 16, 2024 04:15
Visual Studio CodeとIntelliJのショートカット対応表

テキストエディター

目的 Visual Studio Code IntelliJ 補足
行複製 Option + Shift + ↑ or ↓ Command + D Option + Shift + ↑ or ↓はIntelliJでは行入れ替えのショートカットキー
行削除 Command + Shift + K
Command + X ※
※ Clipbordに登録されるので、Command + Vで貼り付けできる
Command + Delete
行追加※行末にいない状態で追加 Command + EnterCommand + Shift + Enter ※※ Shiftをつけてると、上に行が追加される Shif
@nikialeksey
nikialeksey / dependency-report.gradle
Created June 28, 2018 03:44
Gradle: multi-project dependency graph (supports depth > 2, supports gradle 4.4+)
// Inspired by https://gist.github.com/tzachz/419478fc8b009e953f5e5dc39f3f3a2a
// Task creates a .dot file with all inter-module dependencies
// Supports any depth of nested modules
task moduleDependencyReport {
doLast {
def file = new File("project-dependencies.dot")
file.delete()
file << "strict digraph {\n"
file << "splines=ortho\n"
@tokuhirom
tokuhirom / Main.java
Last active January 21, 2022 09:37
tiny nonblocking http client for java
import java.io.Closeable;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.ByteBuffer;
import java.nio.channels.*;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.logging.Logger;
@rstruber
rstruber / elasticsearch-update-settings.py
Created August 25, 2015 16:30
Example of how to use curator and elasticsearch python api to update index settings
import elasticsearch
import curator
import json
client = elasticsearch.Elasticsearch()
indices = curator.get_indices(client)
# Filter anything older than or equal to 3 days
_filter = curator.build_filter(kindOf='newer_than', value=3, time_unit='days', timestring='%Y.%m.%d')
indices = curator.apply_filter(indices, **_filter)
@sile
sile / 0_raft.md
Last active May 27, 2024 07:53
Raft(分散合意アルゴリズム)について