Skip to content

Instantly share code, notes, and snippets.

View axeII's full-sized avatar
🤺
Breaking home network again

Alesh Lerch axeII

🤺
Breaking home network again
View GitHub Profile
@axeII
axeII / backup-volumes.sh
Created December 5, 2022 09:55
Backup docker volumes remotely using docker context
#!/usr/bin/env bash
set -o errexit
set -o pipefail
function backup-volume(){
local volume
volume=$(docker volume ls | awk '$2 != "VOLUME" {print $2}' | fzf)
docker run --rm --name backup\
RT @objective_see: ⚠️ A new malware campaign is targeting Mac
users via sponsored search results & poisoned installers.
📝 Blog post analyz…
@axeII
axeII / docker-cleanup-resources.md
Created June 26, 2020 11:25 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@axeII
axeII / dark_mode.py
Created April 21, 2020 14:47
Change terminal profile based on dark mode in macOS Catalina
#!/usr/bin/python3
import asyncio
import sys
SCRIPT = """
tell application "Terminal"
set default settings to settings set "{}"
end tell
tell application "Terminal"
@axeII
axeII / update_dns.py
Created November 11, 2018 19:18
Update ddns on namecheap
from requests import post
from urllib.request import urlopen
def update_ddns():
host = "@" # means no prefix for your domain
domain_name = "domain.com"
password = "password"
my_ip = urlopen('http://ip.42.pl/raw').read().decode("utf-8")
url = "https://dynamicdns.park-your-domain.com/update?host={}&domain={}&password={}&ip={}".format(
@axeII
axeII / lexer.py
Last active September 7, 2017 18:08
lexer.py
import re
from enum import Enum
class Lexer_state(Enum):
s = 1
word = 2
real = 3
number = 4
string = 5