Skip to content

Instantly share code, notes, and snippets.

View oversize's full-sized avatar
🍵
i find your lack of tea disturbing

Manuel Schmidt oversize

🍵
i find your lack of tea disturbing
View GitHub Profile
@oversize
oversize / gist:bf96f85f96511bda074847785b19e3ba
Last active November 6, 2023 08:57
Read from journald using systemd-python
#!/usr/bin/env python3
"""
The package is called systemd-python
pip install systemd-python
https://pypi.org/project/systemd-python/
The github.com projcet is called python-systemd
https://github.com/systemd/python-systemd
The module to import is called systemd

The cardano-cli binary is bundled with the cardano-node release. Download that from here https://github.com/input-output-hk/cardano-node/releases

The cardano-cli talks to a node via a unix domain socket. That socket must be provided via the CARDANO_NODE_SOCKET_PATH environment variable. I have not seen another way of specifying the socket other then setting the env var.

The cardano-cli provides a rich interface to interact with the node to generate keys and addresses, build and sign transactions, query the ledger and more. The individual commans and some notes are down below.

@oversize
oversize / gist:ac4af8776cff9b5b0899c79dd64508ea
Created October 24, 2022 09:05
uzh bembelpool metadata
{
"name": "BembelPool",
"description": "A Pool for Bembel friends",
"ticker": "BEMP",
"homepage": "https://bembelpool.de"
}
{
"name": "BembelPool",
"description": "A stake pool that loves Bembel",
"ticker": "BEMP",
"homepage": "http://www.bembelpool.de/"
}
#!/bin/bash
# SPDX-License-Identifier: MIT
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
##
## This script is licensed under the terms of the MIT license.
## https://opensource.org/licenses/MIT
#
# Lockable script boilerplate
@oversize
oversize / gpg cheat sheet.md
Last active December 4, 2021 12:15 — forked from SansGuidon/gpg cheat sheet.md
GPG Cheat Sheet

Basics

Generating a key

Interactive

gpg --gen-key or gpg --generate-key generates a new key using default parameters (e.f.: for encryption used) Also creates revocation certificates in ~/.gnupg/openpgp-revocs.d/[ID].rev

generate key in batch mode using a custom profile

@oversize
oversize / postgres-cheatsheet.md
Created April 18, 2019 11:40 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
URxvt*geometry: 120x40
URxvt*perl-ext-common: default,keyboard-select,matcher,clipboard,url-select
URxvt*keysym.Shift-Control-C: perl:clipboard:copy
URxvt*keysym.Shift-Control-V: perl:clipboard:paste
! URxvt*chdir: string
! URxvt*reverseVideo: boolean
! URxvt*loginShell: boolean
! URxvt*multiClickTime: number

Keybase proof

I hereby claim:

  • I am oversize on github.
  • I am oversize (https://keybase.io/oversize) on keybase.
  • I have a public key ASBjigMwCZxpyTlqYksEp-BltTmyNXhtueLkBVQfQ0XlmAo

To claim this, I am signing this object:

@oversize
oversize / Auto Set App Label
Created October 14, 2010 21:19
Not My Code ... here to have it saved somewhere
#!/usr/bin/python2.6
PACKAGE = 'your_project_name.models' # <--- SET YOUR PACKAGE NAME
import os
import types
module_methods = []
model_dir = os.path.dirname(__file__)
for name in os.listdir(model_dir): # Search through every file inside this directory.