Skip to content

Instantly share code, notes, and snippets.

View epsilon-0's full-sized avatar
😺
being cute

A. Tammy epsilon-0

😺
being cute
View GitHub Profile
@epsilon-0
epsilon-0 / pns.sh
Last active May 20, 2022 09:09
run commands in podman container/pod namespace
#!/bin/bash
die() { echo "$*" 1>&2 ; exit 1; }
# run commands in podman container/pod namespace, even in rootless containers
# the first argument is the pod or container name
# the rest of the arguments are the command that needs to be run in the namespace of the container/pod
# this works for rootless containers and can also allow separate wireguard or nftables configuration for each
# container/pod. This is particularly useful if forwarding an IP from a VPS without having a firewall at the VPS.
@pirate
pirate / docker-compose-backup.sh
Last active March 31, 2024 00:51
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@macbookandrew
macbookandrew / findStyles.js
Last active March 30, 2024 15:24
List unique CSS properties for all DOM elements
/**
* List unique CSS properties for all DOM elements
* Initially created to list unique font stacks on a page
* @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer}
*
* @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file}
*
* @author AndrewRMinion Design (https://andrewrminion.com)
* @version 1.1
*
@tvlooy
tvlooy / vmm_howto.md
Last active February 28, 2024 15:14
OpenBSD VMM howto

OpenBSD VMM howto

Setup

/etc/rc.conf.local

apmd_flags="-A"
dhcpd_flags=vether0
vmd_flags=
ntpd_flags="-s"
@raine
raine / gitter-weechat-instructions.md
Last active October 4, 2021 10:52
Connecting to gitter using weechat

Auth and copy token at https://irc.gitter.im/.

Ignore the /PASS thing, it doesn't work in weechat.

/server add gitter irc.gitter.im -ssl -ssl_verify -ssl_dhkey_size=1024 -password=<REPLACE_WITH_YOUR_TOKEN>
/connect gitter
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@eddmann
eddmann / arch.sh
Last active March 14, 2023 22:52
Arch Setup (with Awesome)
wifi-menu
ping www.google.com
# setup disk partitions
cfdisk.
# format disk partitions
lsblk /dev/sda
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
@pascalpoitras
pascalpoitras / config.md
Last active April 8, 2024 18:58
My WeeChat configuration

WeeChat Screenshot

Mouse


enable