Skip to content

Instantly share code, notes, and snippets.

// Bookmarklet: finds filenames with common extensions (pdf, zip, doc, ..)
// - generated using claude.ai
javascript:(function() {
function findTextNodes(node) {
const textNodes = [];
function getTextNodes(node) {
if (node.nodeType === Node.TEXT_NODE) {
textNodes.push(node);
} else {
#!/usr/bin/env bash
set -x
## Get available distros
# softwareupdate --list-full-installers
# softwareupdate --fetch-full-installer --full-installer-version 13.0.1
# Default size ~16 GB
DISK_SIZE="15361m"
STORAGE="/Users/${USER}/Downloads/macos_distro"
@alex-salnikov
alex-salnikov / gist:0fc5e1a934c5818fa48112c6f99bde74
Last active August 23, 2023 17:18 — forked from timstermatic/gist:7384516
Rip a CD to MP3 with cdparanoia
# install cdparanoia e.g apt-get install cdparanoia
# MacOS
# brew install lame
# brew install cdparanoia
# copy all tracks into separate '.wav' files
cdparanoia -B
# convert to mp3 in a loop
@alex-salnikov
alex-salnikov / portainer.docker-compose.yml
Created November 2, 2022 17:13
portainer / docker-compose
version: '3'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer-main
# command: --no-analytics
command: -H unix:///var/run/docker.sock
restart: unless-stopped
security_opt:
@alex-salnikov
alex-salnikov / .bashrc
Created October 10, 2022 08:00
custom prompt
# ~/.bashrc
# prompt - Alex, 19.09.2022
# https://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/
# \! - history id
# \$? - RC of last command
# \u - user
# \h - hostname
# \w - workdir
# \n - new line
@alex-salnikov
alex-salnikov / install_docker.md
Last active June 17, 2022 15:48
install docker
# https://communities.vmware.com/t5/VMware-Fusion-Discussions/How-to-get-a-1280-x-720-window-size-Mac-Guess/td-p/963827
sudo /Library/Application\ Support/VMware\ Tools/vmware-resolutionSet 1900 1080
@alex-salnikov
alex-salnikov / vscode.docker-compose.yml
Created March 31, 2022 09:22
running VSCode with docker-compose
version: "2.1"
services:
vscode:
# image: ghcr.io/linuxserver/code-server
image: linuxserver/code-server
container_name: vscode-server
dns:
- 172.17.0.1
# - 192.168.1.30
environment:
@alex-salnikov
alex-salnikov / gitea.docker-compose.yml
Created March 31, 2022 09:15
running gitea with docker-compose
version: "3"
networks:
gitea:
external: false
services:
server:
#image: gitea/gitea:1.15.6
image: gitea/gitea:latest
  1. on local machine - create ssh key-pair mykeyfile, mykeyfile.pub
$ ssh-keygen -q -N '' -b 4096 -f ~/.ssh/mykeyfile
  1. on local machine - display contents of public key (so that later you can copy/paste them into authorized_keys)
$ cat mykeyfile.pub