Skip to content

Instantly share code, notes, and snippets.

View libbkmz's full-sized avatar

Ilya libbkmz

View GitHub Profile
@libbkmz
libbkmz / gist:42b922133ae9649bd3cbc4e07f64492f
Created January 3, 2024 16:57
DRAM dmidecode AX-370 Gaming K7. F51m
Handle 0x0012, DMI type 17, 92 bytes
Memory Device
Array Handle: 0x000B
Error Information Handle: 0x0011
Total Width: 64 bits
Data Width: 64 bits
Size: 32 GB
Form Factor: DIMM
Set: None
Locator: DIMM 0
@libbkmz
libbkmz / main.rs
Created November 28, 2023 00:34
Simulating worst case for linux kernel RSS memory optimisation update.
#!/usr/bin/env rust-script
//! ```cargo
//! [dependencies]
//! clap = { version = "4.4.9", features = ["std", "derive", "help"] }
//! memmap = "0.7.0"
//! procfs = { version = "0.16.0", default-features = false }
//! thousands = "0.2.0"
//! ```
///
/// This app can be executed with `rust-script` tool like this:
Compiling rustix v0.37.3
Compiling esp-idf-hal v0.40.1
Compiling esp-idf-sys v0.32.1
Compiling esp-idf-svc v0.45.0
Compiling rust-esp32-std-demo v0.29.0 (/home/user/dev/rust_esp/demo2)
error[E0432]: unresolved import `super::super::offset::libc_posix_fadvise`
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.37.3/src/backend/libc/fs/syscalls.rs:19:5
|
19 | use super::super::offset::libc_posix_fadvise;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `libc_posix_fadvise` in `backend::offset`
@libbkmz
libbkmz / Cargo.toml
Created February 9, 2022 13:23
Simple rust wordle solver
[package]
name = "wobli"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
@libbkmz
libbkmz / CMakeLists.txt
Created January 28, 2022 13:20
CMake Error: Cannot determine link language for target "test_1_lib_js".
cmake_minimum_required (VERSION 3.8)
set(CMAKE_VERBOSE_MAKEFILE on)
project(plugin CXX)
add_executable(test test.cc)
em_link_js_library(test "lib.js")
@libbkmz
libbkmz / clink_inputrc_base
Created February 19, 2019 12:25
cmder configs
2021-12-28 10:23:49
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.51-b03 mixed mode):
"pool-25-thread-2" #269 prio=5 os_prio=0 tid=0x0000000039a54000 nid=0x30d0 waiting on condition [0x000000009f33d000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000063c6010a0> (a java.util.concurrent.CompletableFuture$Signaller)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1685)
at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3320)
import itertools
import subprocess as sp
import json
import pprint
from collections import namedtuple
JQ_PATH = "/usr/local/bin/jq"
FIO_PATH = "/usr/local/bin/fio"
JQ_QUERY = namedtuple("JQ_QUERY", ["query", "name", "parse_fn"])
diff --git a/server/src/main/java/org/elasticsearch/tasks/TaskManager.java b/server/src/main/java/org/elasticsearch/tasks/TaskManager.java
index 10fb4eced77..4be7707d886 100644
--- a/server/src/main/java/org/elasticsearch/tasks/TaskManager.java
+++ b/server/src/main/java/org/elasticsearch/tasks/TaskManager.java
@@ -81,6 +81,8 @@ public class TaskManager implements ClusterStateApplier {
private final ConcurrentMapLong<CancellableTaskHolder> cancellableTasks = ConcurrentCollections
.newConcurrentMapLongWithAggressiveConcurrency();
+ private final ConcurrentMapLong<Set<CancellableTaskHolder>> cancellableChildTasks = ConcurrentCollections
+ .newConcurrentMapLongWithAggressiveConcurrency();
@libbkmz
libbkmz / docker-compose.yaml
Created September 20, 2020 21:27
ElasticSearch 7.6.2 cluster with grafana, prometheus and es_exporter
version: '2.2'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- discovery.seed_hosts=es02,es03
# - discovery.zen.ping.unicast.hosts=es02,es03