Skip to content

Instantly share code, notes, and snippets.

View henri's full-sized avatar
💭
hacking the mainframe

henri henri

💭
hacking the mainframe
View GitHub Profile
@henri
henri / 005.start-private-browser-installer.md
Last active April 29, 2025 05:38
start as many instances of a browser as you like (posix compliant)

🔒 SPB (start-private-browser)

This GIST has everything you need to run multiple private web browsers on your system.

💾 Installation

Kick off installer script (you may inspect source below) with the one liner four lines bellow in your terminal :

/bin/bash -c "$(curl -fsSL \
@thunderpoot
thunderpoot / ghostbuster
Created January 30, 2024 22:39
Mosh: You have N detached Mosh sessions on this server
#!/bin/bash
# You know that really annoying message that pops up...
# Mosh: You have 3 detached Mosh sessions on this server, with PIDs:
# - mosh [2294539]
# - mosh [1874313]
# - mosh [2294805]
# I often find myself copying this list of PIDs in order to kill them manually
@EhsanCh
EhsanCh / fpm_get_status.php
Created February 19, 2023 10:54
PHP-FPM real-time status page (Single file without the need for web server configuration)
<?php
// Upload to private url or implement authorization...
if (isset($_GET["json"])) {
header("Content-type: application/json");
exit(json_encode( fpm_get_status() ));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--

multipass に関するメモ

tags: back of ads

インストール

# mac install
brew install --cask multipass

チートシート兼VMの起動まで

@shakthizen
shakthizen / pipewire.md
Last active July 9, 2024 14:53 — forked from the-spyke/pipewire.md
Enable PipeWire on Ubuntu 22.04

Enable PipeWire on Ubuntu 22.04

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA like pipewire-debian, you might get into conflicts.

Ubuntu 22.04 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use PipeWire for audio and Bluetooth instead of PulseAudio.

Starting from WirePlumber version 0.4.8 automatic Bluetooth profile switching (e.g. switching from A2DP to HSP/HFP when an application needs microphone access) is supported. Jammy (22.04) repos provide exactly version 0.4.8. So, we're good.

Based on Debian Wiki, but simplified for Ubuntu 22.04.

@henri
henri / screen_cheat_sheet.txt
Last active September 30, 2024 20:17
screen cheat sheet
# screen is useful command as it is included by default on some distributons / operating systemss (eg MacOS).
# even if you really like tmux, screen is useful in some situations. Both screen and tmux have a good use cases.
# list all screen sessions
screen -list
# start a command in screen
screen -S my_commands_awesome_name -md bash -lc /usr/bin/path_to_my_awesome_command
# start a command via ssh in screen
@circleous
circleous / .env
Created October 4, 2021 17:29
domjudge docker-compose
MYSQL_ROOT_PASSWORD=CHANGE_ME_PLS
MYSQL_PASSWORD=CHANGE_ME_PLS
MYSQL_USER=domjudge
MYSQL_DATABASE=domjudge
MYSQL_HOST=db
CONTAINER_TIMEZONE=Asia/Jakarta
JUDGEDAEMON_PASSWORD_FILE=/judgehost_password
@henri
henri / hue-motion-scan.rb
Last active July 17, 2024 22:15
Phillips Hue Hub Logging / Notification
#!/usr/bin/env ruby
# Copyright, All Rights Reserved Henri Shustak 2020
# Released under the GNU/GPL v3 or later licence
#
# requirements:
# - node.js - for hueadm - just install via package macnageer - eg brew.sh
# - hueadm - https://github.com/bahamas10/hueadm
# - datezone - http://www.fresse.org/dateutils/#datezone
#
@ioquatix
ioquatix / dump.rb
Created April 24, 2020 00:33
Linux Memory Dump
#!/usr/bin/env ruby
# This script reads a list of PIDs from the command line and dumps all readable memory regions.
REGION_PATTERN = /(\h+)-(\h+) (r)/
ARGV.each do |pid|
maps = File.open("/proc/#{pid}/maps")
mem = File.open("/proc/#{pid}/mem")
@bonniss
bonniss / github-search-cheatsheet.md
Last active April 9, 2025 18:54
Github search cheatsheet from official docs.

Github Search Cheat Sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search