Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Raźniewski Razikus

View GitHub Profile
View put_archive-docker-py.py
import tarfile
import uuid
import StringIO
import docker
def main():
client = docker.from_env()
container = client.containers.get(uuidOfContainer)
toSave = "blablabla"
@Razikus
Razikus / VBoxAdditions.sh
Last active Feb 1, 2018
VBoxAdditions requirements for Debian9
View VBoxAdditions.sh
apt install linux-headers-$(uname -r)
apt install build-essential module-assistant dkms
usermod -a -G vboxsf YOURUSERNAME
View executeAllScriptsInDirectoryWithArguments.py
# Evaluators
import os
import sys
scripts = os.listdir("./scripts")
scriptsStrings = []
for script in scripts:
src = open("./scripts/" + script).read()
scriptsStrings.append(src)
@Razikus
Razikus / timetochange.sh
Last active May 17, 2018
To anyone who waits for output change and anyone who wants to calculate estimated time
View timetochange.sh
#!/bin/bash
COMMAND=$@
SECOND="FALSE"
if [ "$1" == "--second" ]; then
SECOND="TRUE"
COMMAND=${@:2}
fi
OUTPUT=$($COMMAND)
NEWOUTPUT=$OUTPUT
a=0
@Razikus
Razikus / debian9javainstall.sh
Last active May 19, 2018
To anyone who search for debian9 install oracle jdk 8
View debian9javainstall.sh
apt install software-properties-common
add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
apt install dirmngr
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C2518248EEA14886
apt update
apt install oracle-java8-installer
View prereqs-ubuntu.sh
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@Razikus
Razikus / lxdeBrightness.md
Last active Jul 29, 2018
Scripts for lxde for raise and lower brightness by fn keys
View lxdeBrightness.md

/usr/local/bin/setBrightness

#!/bin/bash
if [ $# -eq 0 ]; then
	if [ ! -f ~/brightness ]; then
		echo "1" > ~/brightness
	fi
	BRIGHT=$(cat ~/brightness)
else
	BRIGHT=$1
View cleaner
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@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