Skip to content

Instantly share code, notes, and snippets.

View normoes's full-sized avatar
💭
working

Norman Schenck normoes

💭
working
View GitHub Profile
@normoes
normoes / docker_popular_packages.md
Last active February 27, 2023 14:59
install popular docker packages
@normoes
normoes / create_django_SECRE_KEY.md
Created October 7, 2018 11:28
Create Django SECRET_KEY
    >>> import secrets
    >>> import string
    >>> print(''.join(secrets.choice(string.digits + string.ascii_letters + string.punctuation) for i in range(100)))

    *:}~{MH)D&e}SGYRcAO~Q}PFD@:bN$6\d2&A7VB.ge2<zGda5J#)(p>>_H5l*Z>Q9R+!lZ&yn-th2^0ZUf|tkQS8zQu&5+THw&}C
@normoes
normoes / docker_logfile_to_stdout.md
Created October 10, 2018 10:25
forward request and error logs to docker log collector

Like done in the official nginx docker image:

# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
	&& ln -sf /dev/stderr /var/log/nginx/error.log
@normoes
normoes / strace_in_docker_container.md
Created October 12, 2018 06:18
strace within a docker container

Run the container with:

--cap-add sys_admin --cap-add sys_ptrace 

Within the container:

apt-get strace
@normoes
normoes / get_latest_release.md
Created October 12, 2018 07:45
Get latest github release

Get latest:

curl --silent "https://api.github.com/repos/monero-project/monero/releases/latest" | grep '"tag_name":' | cut -d ':' -f2 | tr -d '", '

Get all

curl --silent "https://api.github.com/repos/monero-project/monero/releases" | grep '"tag_name":' | cut -d ':' -f2 | tr -d '", ' | head -n1
@normoes
normoes / pipenv_create_virtualenv_in_project_dir.md
Last active October 12, 2018 07:52
Create pipenv virtual env folder in project directory

create venv in project directory

# create project directory
mkdir ~/project && cd ~/project
# create virtual environment
PIPENV_VENV_IN_PROJECT=true pipenv --three
# check location
pipenv --venv
# output
@normoes
normoes / ledger_nano_s_and_monero.md
Last active October 22, 2018 09:10
Using the ledger nano s with Monero

Ledger nano s

Ledger nano s initialization

After unboxing the ledger, I just connected it via the USB cable. It powered up perfectly and started the initialization process. The ledger asked to set a PIN, then I had to copy the seed word by word and confirm it by repeating it word by word.

I had a short look into the settings and naively tried to create a HW wallet using monero-wallet-cli (see below for the actual command).

Getting the ledger recognized by the system

It turned out the ledger nano s was not detected by my linux system (ubuntu 18.04), so I searched the internet and found a script (see below) from

@normoes
normoes / get_files_and_info_from_docker_container.md
Created March 1, 2019 15:12
Get files and information from a docker container

This can be used to retreive files/binaries/information from docker containers.

#!/bin/bash

set -Eeuo pipefail

mkdir ./binary || true

# build most recent docker image
@normoes
normoes / docker_troubleshooting.md
Last active March 12, 2019 13:33
docker troubleshooting

Text file is busy

When executing a file whose permissions were changed earlier, a Text file is busy error could appear.

RUN cd scripts/test_env \
    && chmod +x test.prepareapp.sh
    && ./test.prepareapp.sh

It helps to add sync after changing permissions on the file:

@normoes
normoes / dns_over_tls_pubkey_value.md
Last active February 5, 2025 23:16
getting tls pubkey value for DNS over TLS certificates

Getting the tls pubkey for a DNS over TLS address

I added cloudflare-dns.com to my stubby.yml and couldn't find any information on the value of the tls_pubkey_pinset

tls_pubkey_pinset:
  - digest: "sha256"
    value: MISSING

Although I could find some examples, the value seemed to be wrong.