Skip to content

Instantly share code, notes, and snippets.

View marslo's full-sized avatar

marslo marslo

View GitHub Profile
@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
@marslo
marslo / # script for jenkins agent.md
Last active April 11, 2024 22:34
jenkins script for agents

🛠 groovy scripts for jenkins agents

... keeping update ...

usage

  • via CLI
    $ ssh domain.jenkins.com groovy =< /path/to/script.groovy
@marslo
marslo / # groovy scripts for jenkins credentials.md
Last active April 11, 2024 22:35
jenkins universal credential closure

🛠 groovy scripts for jenkins credentials

... keeping update ...

@marslo
marslo / # groovy script for jenkins pipeline.md
Last active April 11, 2024 22:48
Get/Update Jenkins GitSCM CredneitalId and Repo URL for all pipelines

🛠 groovy scripts for read/update jenkins pipelines

... keeping update ...

@marslo
marslo / Makefile.patch
Last active May 12, 2024 06:40
patch for build lua v5.4.6 as a shared library (liblua.so)
--- Makefile 2024-01-04 18:12:26.836000000 -0800
+++ Makefile.patched 2024-01-04 18:14:09.840000000 -0800
@@ -38,21 +38,21 @@
# Convenience platforms targets.
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
+# Lua version and release.
+V= 5.4
+R= $V.6
+
@marslo
marslo / InstallDockerEE.ps1
Created December 13, 2023 07:20 — forked from Koubek/InstallDockerEE.ps1
Install Docker EE (for Windows Server)
<#
.SYNOPSIS
Install/Upgrade Docker EE (Windows Server).
.DESCRIPTION
This script checks the official Docker EE (for Windows Server) repository and
detects the latest version available to download and install. It also compares
with the version currently installed on the Docker host (WinServer) and asks
you if you wish to proceed or not.
@marslo
marslo / build-git-for-osx.md
Last active December 8, 2023 22:42
log : build git from source for macOS
/*
Forked from https://gist.github.com/sboardwell/f1e85536fc13b8e4c0d108726239c027
Changes made:
- add `combinedPerm` functions to make sure the new config won't replace the current settings.
**/
/*
Copyright (c) 2015-2018 Sam Gleske - https://github.com/samrocketman/jenkins-bootstrap-shared
Licensed under the Apache License, Version 2.0 (the "License");
@marslo
marslo / # python@2 - 2018-05-23_17-21-03.txt
Created May 23, 2018 09:22
python@2 on macOS 10.13.4 - Homebrew build logs
Homebrew build logs for python@2 on macOS 10.13.4
Build date: 2018-05-23 17:21:03