Skip to content

Instantly share code, notes, and snippets.

View lubo's full-sized avatar

Ľubo Kučera lubo

View GitHub Profile
@lubo
lubo / fix-highstate-log
Last active September 27, 2020 08:01
Fixes binary output in Salt highstate logs
#!/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 / example.com.csr.cnf
Last active August 14, 2020 19:53
Minimal OpenSSL CSR template with SANs, ideal for requesting DV SAN X.509 certificates
[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 April 12, 2024 08:01
My music library, including uploaded songs, which you won't find on my channel (https://music.youtube.com/channel/UCG3yrEtFpF8-z1zEmdYSprg).
Title Artist Album ID Uploaded
"Kansas City Shuffle" J. Ralph Lucky Number Slevin Original Motion Picture Soundtrack UZs0lFwQ0hQ True
(Rock) Superstar (feat. Chino Moreno & Everlast) 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 (feat. A$AP Ferg) King Avriel The Alchemist and Oh No Present Welcome to Los Santos NwLE_2hFFiw False
7/11 Beyoncé BEYONCÉ [Platinum Edition] A-arj7Qkw14 False
@lubo
lubo / gcp_deployment.py
Last active June 14, 2020 16:39
Ansible module for Google Cloud Deployment Manager
#!/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 October 28, 2015 11:53
An example program demonstrating time efficiency of different number-swapping algorithms
#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) {