Skip to content

Instantly share code, notes, and snippets.

View marslo's full-sized avatar

marslo marslo

View GitHub Profile
{"version":1,"resource":"file:///Users/marslo/iMarslo/job/code/re/sdk-release/vars/wrapper.groovy","entries":[{"id":"X0fn.groovy","timestamp":1743640609154},{"id":"WdKu.groovy","timestamp":1743640625380}]}
@marslo
marslo / jenkins-decrypt.py
Created March 10, 2025 22:22 — forked from menski/jenkins-decrypt.py
Decrypt jenkins password hashes
#!/usr/bin/env python3
# original: https://raw.githubusercontent.com/tweksteen/jenkins-decrypt/master/decrypt.py
# requires: pycrypto
import re
import sys
import base64
@marslo
marslo / cht.sh
Created February 15, 2025 00:22
use-bat-for-cht.sh
#!/bin/bash
# shellcheck disable=SC1117,SC2001
#
# [X] open section
# [X] one shot mode
# [X] usage info
# [X] dependencies check
# [X] help
# [X] yank/y/copy/c
# [X] Y/C
#         start with `+`
#             v
$ export PS4='+\033[37;2;3m(${BASH_SOURCE}:${LINENO})\033[0m: \033[35;2;3m${FUNCNAME[0]:+${FUNCNAME[0]}():}\033[0m '

$ bash -x diff.sh 
+(diff.sh:4):  set -euo pipefail
+(diff.sh:13):  array1=("key1" "key2" "key3" "key4" "key5" "key6" "key7" "key8" "key9" "key10")
+(diff.sh:14):  array2=("key1" "key3" "key4" "key2" "key5" "key6")
+(diff.sh:15):  array3=($(diff array1[@] array2[@]))
@marslo
marslo / tlrc-update.sh
Last active February 13, 2025 23:37
tlrc --update workaround
#!/usr/bin/env bash
# shellcheck source=/dev/null disable=SC2155
#=============================================================================
# FileName : tlrc-update
# Author : [email protected]
# Created : 2025-02-13 13:44:36
# LastChange : 2025-02-13 15:15:28
# Description : workaround for `error: io: invalid peer certificate: UnknownIssuer`
# @see https://github.com/tldr-pages/tlrc/issues/111#issuecomment-2657620327
#=============================================================================
@marslo
marslo / 0.11.0-dev-1668+g0985e784d8-Homebrew.full.log
Last active February 2, 2025 00:14
0.11.0-dev-1668+g0985e784d8-Homebrew.debug.log
This file has been truncated, but you can view the full file.
```bash
$ brew uninstall neovim && brew install --HEAD --force neovim -v --debug
Uninstalling /usr/local/Cellar/neovim/HEAD-0985e78... (2,045 files, 30.1MB)
==> Autoremoving 4 unneeded formulae:
lpeg
luajit
luv
unibilium
Uninstalling /usr/local/Cellar/lpeg/1.1.0... (14 files, 263.1KB)
Uninstalling /usr/local/Cellar/unibilium/2.1.2... (64 files, 262.7KB)
@marslo
marslo / build-infozip-from-source.md
Last active December 12, 2024 10:11
build info-zip from source

get source

$ wget ftp://ftp.info-zip.org/pub/infozip/src/zip30.zip
$ unzip zip30.zip

apply patch

$ curl -fsSL https://gist.githubusercontent.com/marslo/70a3f6728633c49bed865da684378b31/raw/cf402112315ededbfb58c0e17629e9a74708e370/zipinfo.patch
$ cd zip30
@marslo
marslo / markdown-details-collapsible.md
Created September 11, 2024 03:10 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@marslo
marslo / color-utils.sh
Last active May 27, 2024 13:02
color utilis
#!/usr/bin/env bash
# @author : Anthony Bourdain
# @credit : https://stackoverflow.com/a/55073732/2940319
# @usage :
# - `rgbtohex 17 0 26` ==> 1001A
# - `rgbtohex -h 17 0 26` ==> #1001A
function rgbtohex () {
addleadingzero () { awk '{if(length($0)<2){printf "0";} print $0;}';}
if [[ ${1} == "-h" ]]; then
@marslo
marslo / 00.config.out
Last active April 11, 2024 22:30
node on macOS 14.3 - Homebrew build logs
HOMEBREW_VERSION: 4.2.10-44-gfb09997
ORIGIN: https://github.com/Homebrew/brew
HEAD: fb099976bd68003435ebccf4a4c2066768021286
Last commit: 7 hours ago
Core tap HEAD: c394726d16bac282ed47fb18d10e7f96f5283d89
Core tap last commit: 4 weeks ago
Core tap JSON: 29 Feb 02:04 UTC
Core cask tap origin: https://mirrors.ustc.edu.cn/homebrew-cask.git
Core cask tap HEAD: ea614e98b852030f32f73a4583d84491dca3df0e
Core cask tap last commit: 4 weeks ago