Skip to content

Instantly share code, notes, and snippets.

network_config: |
version: 2
ethernets:
eth0:
match:
macaddress: "52:54:00:52:54:00"
addresses:
- 10.0.0.10/255.255.255.0
gateway4: 10.0.0.1
nameservers:

https://zenhax.com/viewtopic.php?t=27

It starts with 0x78 (rarely also with 0x58).
Use offzip to test if it's really zlib.
Code:
78 da ed 8f 6b 48 53 61 1c c6 df 65 35 ed 32 8d   x...kHSa...e5.2.
4a 49 9d 65 20 88 93 2d 13 ba a0 53 ab 85 5a b9   JI.e ..-...S..Z.
96 49 a2 76 d0 32 d7 cd a8 b9 72 a9 1d 2d fd 60   .I.v.2....r..-.`
65 84 a5 cd 4a 26 eb 2a 76 d9 64 5e 32 87 a7 bc   e...J&.*v.d^2...
@subuk
subuk / yandex_lockbox.py
Created May 18, 2021 19:56
Ansiblie lookup plugin for Yandex Cloud lockbox
# Usage: '{{ lookup("yandex_lockbox", "e6r3ox0h4q0", field="some_secret") }}'
import os
import os.path
import time
import json
import urllib.request
import jwt
from ansible.plugins.lookup import LookupBase
from ansible.errors import AnsibleError
@subuk
subuk / main.go
Created July 20, 2021 11:36
Matrix Spiral
package main
import "fmt"
var Matrix = [][]int{
{63, 22, 17, 39, 36},
{53, 22, 31, 40, 36},
{43, 81, 11, 41, 36},
{13, 22, 87, 42, 38},
{33, 22, 91, 47, 99},