Skip to content

Instantly share code, notes, and snippets.

View t0r0X's full-sized avatar

Victor t0r0X

View GitHub Profile
@barafael
barafael / Cargo.toml
Created August 11, 2023 08:16
clap+humantime+serde+figment
[package]
name = "clapment"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = "1.0.72"
clap = { version = "4.3.21", features = ["derive"] }
figment = { version = "0.10.10", features = ["env", "json", "toml"] }
humantime = "2.1.0"
@nikolay-n
nikolay-n / jqPlay.md
Created September 29, 2020 20:49
jqPlay snippets collected using google and github search
@diafour
diafour / jq.test
Created March 31, 2020 18:14
jq fromjson or tostring problem
try (tonumber) catch ("Should catch error")
"a20"
"Should catch error"
# Tests are groups of three lines: program, input, expected output
# Blank lines and lines starting with # are ignored
#
# Simple value tests to check parser. Input is irrelevant
#
@wxgeorge
wxgeorge / yk-tech.2020-01-09.md
Created January 10, 2020 21:50
Yukon Tech Collective January 2020 meetup notes

We investigated the tool jq.

Wes first encountered this as a query tool for JSON. Our probing with the tool lead us to believe that it is much more than this.

This author intends to investigate JSONPath in the future, as it feels targetted specifically at querying. jq is capable of arbitrary JSON transformations. There is also JMESpath which is described as query language for JSON (this author was under the impression JMESpath was also capable of JSON transformations, albeit a more limited set than jq allows for the expression of)

First we needed some JSON. @ryanagar noted the considerable breadth of Yukon GIS data. With the help of a query builder, we were able to pull down a blob, and the task for the group was to investigate it's structure w

@rbaul
rbaul / FeignConfig.java
Created July 3, 2019 15:48
Ignore FeignClient Mapping
@Configuration
@ConditionalOnClass({ Feign.class })
public class FeignConfig {
@Bean
public WebMvcRegistrations feignWebRegistrations() {
return new WebMvcRegistrations() {
@Override
public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
return new FeignFilterRequestMappingHandlerMapping();
}
@LayZeeDK
LayZeeDK / angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Last active December 20, 2025 20:04
Angular CLI, Angular, Node.js, TypeScript, and RxJS version compatibility matrix. Officially part of the Angular documentation as of 2023-04-19 https://angular.dev/reference/versions
Angular CLI version Angular version Node.js version TypeScript version RxJS version
~16.0.0 ~16.0.0 ^16.13.0 || ^18.10.0 >=4.9.5 <5.1.0 ^6.5.5 || ^7.4.0
~15.2.0 ~15.2.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.1.0 ~15.1.0 ^14.20.0 || ^16.13.0 || ^18.10.0 >=4.8.4 <5.0.0 ^6.5.5 || ^7.4.0
~15.0.5 ~15.0.4 ^14.20.0 || ^16.13.0 || ^18.10.0 ~4.8.4 ^6.5.5 || ^7.4.0
~14.3.0 ~14.3.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.2.0 ~14.2.0 ^14.15.0 || ^16.10.0 >=4.6.4 <4.9.0 ^6.5.5 || ^7.4.0
~14.1.3 ~14.1.3 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~14.0.7 ~14.0.7 ^14.15.0 || ^16.10.0 >=4.6.4 <4.8.0 ^6.5.5 || ^7.4.0
~13.3.0 ~13.3.0 ^12.20.2 || ^14.15.0 || ^16.10.0 >=4.4.4 <4.7.0 ^6.5.5 || ^7.4.0
# This is a note of https://blog.pjsen.eu/?p=440
I did a little research and have found that GIT Bash uses MINGW compilation of GNU tools.
It uses only selected ones.
You can install the whole distribution of the tools from https://www.msys2.org/
and run a command to install Tmux. And then copy some files to installation folder of Git.
This is what you do:
Install before-mentioned msys2 package and run bash shell
Install tmux using the following command: pacman -S tmux
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active September 11, 2025 15:46
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@takuzoo3868
takuzoo3868 / tree.sh
Last active July 4, 2024 10:05
Shell script that reproduced the tree command
#!/usr/bin/env bash
# treeを擬似的に再現したスクリプト
dir_count=0
file_count=0
traverse() {
dir_count=$(expr $dir_count + 1)
local directory=$1
local prefix=$2