Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Raźniewski Razikus

View GitHub Profile
@Razikus
Razikus / PKDJsonArray
Last active Aug 26, 2018
JSON Array of PL PKD codes
View PKDJsonArray
[{"code":"01.11.Z","desc":"Uprawa zbóż, roślin strączkowych i roślin oleistych na nasiona, z wyłączeniem ryżu"},{"code":"01.12.Z","desc":"Uprawa ryżu"},{"code":"01.13.Z","desc":"Uprawa warzyw, włączając melony oraz uprawa roślin korzeniowych i roślin bulwiastych"},{"code":"01.14.Z","desc":"Uprawa trzciny cukrowej"},{"code":"01.15.Z","desc":"Uprawa tytoniu"},{"code":"01.16.Z","desc":"Uprawa roślin włóknistych"},{"code":"01.19.Z","desc":"Pozostałe uprawy rolne inne niż wieloletnie"},{"code":"01.21.Z","desc":"Uprawa winogron"},{"code":"01.22.Z","desc":"Uprawa drzew i krzewów owocowych tropikalnych i podzwrotnikowych"},{"code":"01.23.Z","desc":"Uprawa drzew i krzewów owocowych cytrusowych"},{"code":"01.24.Z","desc":"Uprawa drzew i krzewów owocowych ziarnkowych i pestkowych"},{"code":"01.41.Z","desc":"Chów i hodowla bydła mlecznego"},{"code":"01.25.Z","desc":"Uprawa pozostałych drzew i krzewów owocowych oraz orzechów"},{"code":"01.26.Z","desc":"Uprawa drzew oleistych"},{"code":"01.27.Z","desc":"Uprawa roślin wykor
@Razikus
Razikus / dockerize.sh
Created Feb 5, 2019
installs docker on arm in version docker-ce=18.06.1~ce~3-0~raspbian
View dockerize.sh
#!/bin/sh
set -e
# This script is meant for quick & easy install via:
# $ curl -fsSL https://get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#
# For test builds (ie. release candidates):
# $ curl -fsSL https://test.docker.com -o test-docker.sh
# $ sh test-docker.sh
@Razikus
Razikus / assets
Created Oct 10, 2019
Minecraft 1.14 asset list from index
View assets
icons/icon_16x16.png
icons/icon_32x32.png
icons/minecraft.icns
minecraft/icons/icon_16x16.png
minecraft/icons/icon_32x32.png
minecraft/icons/minecraft.icns
minecraft/lang/af_za.json
minecraft/lang/ar_sa.json
minecraft/lang/ast_es.json
minecraft/lang/az_az.json
@Razikus
Razikus / yamlunion.py
Created Oct 22, 2019
For the situation, where you have 2 yaml files, one is older, but fits in 50% of bigger, and bigger have just new keys, then you don't want to do something from beginning, and consider the script that will just join 2 files, but take objects that exists from the bigger file, uff.
View yamlunion.py
import ruamel.yaml as yamler
import ruamel
import sys
def main():
resultDict = dict()
if(len(sys.argv) < 4):
print("USAGE: script biggerYaml smallerYaml resultfile")
print("If entry is in smaller yaml - it will go to result")
print("If entry is not in smaller yaml - it will take it from biggerYaml")
sys.exit(1)
View partreadonlyfstab
#/bin/mount -o bind / writeable/
#/bin/mount -o remount,rw / writeable/
tmpfs /tmp tmpfs nosuid,nodev 0 0
tmpfs /var/log tmpfs nosuid,nodev 0 0
tmpfs /var/tmp tmpfs nosuid,nodev 0 0
proc /proc proc defaults 0 0
PARTUUID=x /boot vfat defaults,ro 0 2
PARTUUID=xx / ext4 defaults,noatime,ro 0 1
View gist:ca1bb3c23a20b4173bd856b74b2566db
[{"id":"9f1559dc.1c6748","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"dff0b9e8.e718a8","type":"ui_template","z":"9f1559dc.1c6748","group":"5b65b30a.de7e4c","name":"","order":0,"width":0,"height":0,"format":"<img src=\"{{msg.payload}}\"/>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":540,"y":380,"wires":[[]]},{"id":"d6aa0132.a2191","type":"mqtt in","z":"9f1559dc.1c6748","name":"","topic":"testtest","qos":"2","datatype":"auto","broker":"27edd438.632cac","x":280,"y":380,"wires":[["dff0b9e8.e718a8"]]},{"id":"86450727.888b18","type":"inject","z":"9f1559dc.1c6748","name":"","topic":"","payload":"https://www.testhr.pl/img/logo.png","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":300,"wires":[["1aec40e6.85496f"]]},{"id":"1aec40e6.85496f","type":"mqtt out","z":"9f1559dc.1c6748","name":"","topic":"testtest","qos":"","retain":"","broker":"27edd438.632cac","x":570,"y":300,"wires":[]},{"id":"b66b8ef8.f4fa9","type":
View dashboardstyle
<style>
body {
background: url("{{msg.payload}}") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#Home_Default {
display: none;
View docker-compose.yml and Dockerfile.template
version: '2'
services:
traefik:
build:
context: traefik
dockerfile: Dockerfile.template
command:
- --entrypoints.web.address=:80
- --providers.docker=true
- --providers.docker.exposedbydefault=false