Skip to content

Instantly share code, notes, and snippets.

View michtesar's full-sized avatar

Michael Tesař michtesar

View GitHub Profile
#!/bin/bash
function update {
# Refresh OS a little bit
sudo apt-get update
sudo apt-get upgrade -y
sudo snap refresh
sudo apt autoremove
sudo apt-get install -f -y
@michtesar
michtesar / find_address.py
Created February 12, 2020 08:59
Find IP address by its hostname (butforce)
import socket
def find_address(hostname="localhost", address_range=range(255)):
for address in address_range:
print(address)
try:
host = socket.gethostbyaddr("192.168.1.{}".format(address))
except socket.herror:
continue
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$"
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@michtesar
michtesar / generate_aruco_markers.py
Created April 4, 2019 23:13
Generate Aruco markers
import numpy as np
import cv2, PIL
from cv2 import aruco
import matplotlib.pyplot as plt
import matplotlib as mpl
import pandas as pd
aruco_dict = aruco.Dictionary_get(aruco.DICT_ARUCO_ORIGINAL)
fig = plt.figure()