Skip to content

Instantly share code, notes, and snippets.

@henri
henri / 0001.crontab-dump.bash
Created August 5, 2025 02:29
crontab cheat sheet
#!/bin/bash
#
# (C)2020 Henri Shustak
# Released Under the MIT Licence
# https://mit-license.org/
#
# dump the crontab
user_name=$(whoami)
host_name=$(hostname)
@henri
henri / 000.tar_cheat_sheet.txt
Last active August 5, 2025 03:17
tar cheatsheet
# create a compressed archive from a number of sources
tar -czf compressed-archive.tar.gz /srv/source1 /srv/source2 # ...
# list all .txt files in archive (better if you are hunting into large archives)
tar -tf archive.tar --wildcards '*.txt'
tar -tzf archive.tar.gz --wildcards '*.txt'
# it is possible to use third party tools to mount or explore a compressed tar archive
# eg :
# - https://github.com/mxmlnkn/ratarmount
@henri
henri / gist:e91dcde274cea0c584a73f9dc22b115f
Created July 16, 2025 02:24 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@henri
henri / await.sh
Created July 16, 2025 02:14 — forked from zzak/await.sh
Script to wait for localhost service in bash, with retries
#!/usr/bin/env bash
set -euo pipefail
TRIES=0
until [ $TRIES -eq 10 ] || nc -z localhost 3000; do
sleep 0.1
TRIES=$(( TRIES+1 ))
done
require 'csv'
require 'open-uri'
file = "Workbook3.csv"
content = CSV.read(open(file), encoding: 'ISO-8859-1:UTF-8', col_sep: ";")
File.open("output.csv", "w") do |f|
rows = content.map { |row| "\"#{row.join('","')}\"" }.join("\n")
f.puts(rows)
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@henri
henri / close_notifications_applescript.js
Created July 16, 2025 02:04 — forked from dentarg/close_notifications_applescript.js
AppleScript to close all notifications on macOS Big Sur
function run(input, parameters) {
const appName = "";
const verbose = true;
const scriptName = "close_notifications_applescript";
const CLEAR_ALL_ACTION = "Clear All";
const CLEAR_ALL_ACTION_TOP = "Clear";
const CLOSE_ACTION = "Close";
@henri
henri / resolve_install_linux_mint_cheatsheet.txt
Last active June 27, 2025 22:22
Installing Resolve GNU/LINUX Mint
# URL with details for Linux Mint install instructions :
# https://forum.blackmagicdesign.com/viewtopic.php?f=38&t=200276
# Big thanks to : Christoph Schmid!
# Running the installer
# Install the dependiencies as suggested by installer. If you still have message regarding some items missing
# simply setup the skip :
export SKIP_PACKAGE_CHECK=1
# Once you have run the installer.
@henri
henri / yt-comments.bash
Last active July 16, 2025 03:33
Youtube Comment Download Wrapper
#!/usr/bin/env bash
# (C) 2025 Henri Shustak
# simple script to download youtube comments from a single video in bulk
# usage : ./yt-comments.bash "youtube.video.url"
# requires : python package called youtube-comment-downlaoder
# dependcy install : pip install youtube-comment-downloader
# currently set to ues sublime text to view the file when download completes..(last line)
tempfile=$(mktemp /tmp/yt-comments.XXXXXX)
suffix="json"
# get link speeds of a 5 port device
interface ethernet monitor numbers=0,1,2,3,4