Skip to content

Instantly share code, notes, and snippets.

Avatar

Ľubo Kučera lubo

View GitHub Profile
@lubo
lubo / fix-highstate-log
Last active Sep 27, 2020
Fixes binary output in Salt highstate logs
View fix-highstate-log
#!/usr/bin/env python3
import ast
import fileinput
try:
for line in fileinput.input():
line = line.rstrip('\n')
try:
line = ast.literal_eval(line).decode()
@lubo
lubo / A2638B67AE80528695DEECB2CAEDE3D60E2B4E43.asc
Last active Sep 8, 2020
My PGP public key, including revoked UIDs and accepted 3rd-party signatures
View A2638B67AE80528695DEECB2CAEDE3D60E2B4E43.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEWVDsOxYJKwYBBAHaRw8BAQdAoUj4StfQEzK2BMdmSll3abssuPZapw6k3/zz
VbmOCUe0L8S9dWJvbcOtciBLdcSNZXJhIDxsdWJvbWlyLmt1Y2VyYS5qckBnbWFp
bC5jb20+iJkEExYIAEECGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4ACGQEWIQSi
Y4tnroBShpXe7LLK7ePWDitOQwUCXvJS4QUJB4KaJgAKCRDK7ePWDitOQ9FkAPwP
aQbtxY+r4EiyD/uWvbp/zgvc1663DkpyTrQ9dTcLuQEAs/i0qyPWTrWG7txbHIhz
jYTtCOA9heU8Eso1kapanw+0NcS9dWJvbcOtciBLdcSNZXJhIDxsdWJvbWlyLmt1
Y2VyYUBkZXZpbnNvbHV0aW9ucy5jb20+iJ8EMBYIAEcWIQSiY4tnroBShpXe7LLK
7ePWDitOQwUCXvJP0ykdIE5vIGxvbmdlciB3b3JraW5nIHdpdGggRGV2aW4gU29s
@lubo
lubo / example.com.csr.cnf
Last active Aug 14, 2020
Minimal OpenSSL CSR template with SANs, ideal for requesting DV SAN X.509 certificates
View example.com.csr.cnf
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[req_distinguished_name]
CN = example.com
[v3_req]
subjectAltName = @alt_names
@lubo
lubo / all-songs.csv
Last active May 14, 2021
My music library, including uploaded songs, which you won't find on my channel (https://music.youtube.com/channel/UCG3yrEtFpF8-z1zEmdYSprg).
View all-songs.csv
Title Artist Album ID Uploaded
"Kansas City Shuffle" J. Ralph Lucky Number Slevin Original Motion Picture Soundtrack UZs0lFwQ0hQ True
(Rock) Superstar Cypress Hill Skull & Bones RBT5yhR_2Rw False
0 To 100 / The Catch Up Drake 0 To 100 / The Catch Up s0PZYWA4LoM False
10 Bands Drake If You're Reading This It's Too Late tcL2B0ilMZw False
2 On (feat. ScHoolboy Q) Tinashe 2 On Ya-M9KrderM False
2 Phones Kevin Gates Islah (Deluxe) 2mhKvNwOIWk False
2 Phút Hơn (KAIZ Remix) Pháo 2 Phút Hơn (KAIZ Remix) Ra5qZDJefJs False
20's 50's 100's King Avriel The Alchemist and Oh No Present Welcome to Los Santos 71Z8zq7Y9js False
A Better Tomorrow Wu-Tang Clan Wu-Tang Forever b0A8R5ry2vQ False
@lubo
lubo / gcp_deployment.py
Last active Jun 14, 2020
Ansible module for Google Cloud Deployment Manager
View gcp_deployment.py
#!/usr/bin/python
# Copyright: (c) 2018, Devin Solutions s.r.o.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
@lubo
lubo / swap_numbers.c
Last active Oct 28, 2015
An example program demonstrating time efficiency of different number-swapping algorithms
View swap_numbers.c
#include <stdio.h>
#include <time.h>
#include <inttypes.h>
typedef struct {
void (*function) (uint32_t *a, uint32_t *b);
char *description;
} swapping_method;
void swap_temp(uint32_t *a, uint32_t *b) {