Skip to content

Instantly share code, notes, and snippets.

View jtomori's full-sized avatar
👨‍🌾
It ain't much, but it's honest work.

Juraj Tomori jtomori

👨‍🌾
It ain't much, but it's honest work.
View GitHub Profile
import re
import urllib.request
import concurrent.futures
from urllib.error import HTTPError
def load_url_parse(url, timeout=10):
"""Load the page from the passed url and search for dimensions."""
try:
with urllib.request.urlopen(url, timeout=timeout) as conn:
@jtomori
jtomori / .zshrc
Last active April 23, 2021 11:36
Z shell config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@jtomori
jtomori / bmp_peek.md
Last active December 4, 2019 17:39
Peek into a .bmp file
$ dd if=img.bmp bs=1 skip=54 status=none | xxd -g 3 -c 12

bs=1 - Block size of 1 byte

skip=54 - Skips first 54 bytes, which is header info

status=none - Hide debug information

@jtomori
jtomori / mpv.conf
Last active October 12, 2020 12:31
# ~/.config/mpv/mpv.conf
loop-file=inf
sub-codepage=utf8:cp1250
@jtomori
jtomori / LICENSE
Created May 25, 2019 18:34
This license applies to all public gists: https://gist.github.com/jtomori
MIT License
Copyright (c) 2019 Juraj Tomori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
https://www.americanscientist.org/article/the-new-language-of-mathematics
https://www.alanzucconi.com/2016/07/01/raymarching/
https://www.researchgate.net/figure/Mandelbrots-plot-that-is-self-replicating-according-to-some-predetermined-rule-such-that_fig2_291014332
https://en.wikipedia.org/wiki/Mandelbrot_set#/media/File:Mandel.png
https://www.jamendo.com/track/5340/realite
CC-SA, CC-BY
https://www.jamendo.com/track/1614082/soothing-guitar-ambient
CC-ND, CC-NC, CC-BY
@jtomori
jtomori / globals.bat
Last active March 1, 2019 21:19
Redshift config
...
rem rs for houdini
set "RS_ROOT_PATH=%PIPELINE%/%RS_VERSION%"
set "HOUDINI_PATH=%RS_ROOT_PATH%/Plugins/Houdini/%HOUDINI_VERSION%;%HOUDINI_PATH%"
set "PATH=%PATH%;%PIPELINE_WIN%\%RS_VERSION%\bin"
set "REDSHIFT_COREDATAPATH=%RS_ROOT_PATH%"
set "REDSHIFT_LOCALDATAPATH=%HOME%/%COMPUTERNAME%/redshift"
set "REDSHIFT_LICENSEPATH=%PIPELINE%/redshift-lic/"
set "redshift_LICENSE=%PIPELINE_WIN%\redshift-lic\redshift.lic"
@echo off &&^
%RR_ROOT%\bin\win64\rrClientcommander.exe -Abortdisable &^
call \\network_share\project\pipeline\houdini\houdini_remote.bat &&^
pushd \\network_share\project &&^
cd "Production\shot\task" &&^
hbatch -c "render -Va /obj/geo1/rop_geometry1 ; quit" "project_file_v003.hipnc" > "bat\project_file_v003.hipnc.rop_geometry1.bat.log" 2>&1 &&^
move "bat\project_file_v003.hipnc.rop_geometry1.bat.log" "bat\project_file_v003.hipnc.rop_geometry1.bat.log.finished" &&^
popd &&^
%RR_ROOT%\bin\win64\rrClientcommander.exe -Enable
@jtomori
jtomori / env.sh
Last active March 5, 2019 17:52
A collection of bash scripts to help with managing VCA for remote rendering, for https://jurajtomori.wordpress.com/2019/03/05/setting-up-houdini-on-a-headless-linux-server/
#!/usr/bin/env bash
printf "\n\nInitializing pipeline environment \nyou can disable it by commenting out the last line in ~/.bashrc\n\n\n"
# Libs
export LD_LIBRARY_PATH=/var/lib/iray/juraj/local/usr/lib64/
# RS
export REDSHIFT_COREDATAPATH=/var/lib/iray/juraj/redshift_2_5_67
PATH=$PATH:$REDSHIFT_COREDATAPATH/bin
#!/usr/bin/env bash
# find location of this script, move one level up
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
# set up env vars
export HOUDINI_DSO_PATH="${HOUDINI_DSO_PATH}:&:$ROOT/dso"
export HOUDINI_DSO_ERROR=2
# run testing scene