Skip to content

Instantly share code, notes, and snippets.

@wayerr
wayerr / shader_toon_fur.osl
Last active December 2, 2021 15:15
Shader generating random placed fur strands for displacement
//#define DEBUG 1
void _show_1cell(float z, float x, output float r) {
float b = 0.01;
if ((x < b || z < b)) {
r = 1;
}
}
float _strand_curve(float x) {
@wayerr
wayerr / tomcat_log_analyzer.py
Created August 8, 2018 13:36
Tomcat log file parser
#!/usr/bin/python
# -*- coding: UTF-8 -*-
# Version: 0.1
# Author: rad <radiofun@ya.ru>
# License: GPL 3
#
import sys
import codecs
import re
@wayerr
wayerr / cpu-load.py
Last active October 12, 2017 14:08
load cpu by specified schedule
#!/usr/bin/python3
import argparse
import time
import os
import math
# data, each byte of it used as cpu load value: (byte/255.0)
data = "0020305060708090A0B0C0D0E0F0FFA050"
@wayerr
wayerr / sample.html
Last active March 30, 2017 15:27
javascript code for parse unix-style cmd line
<html>
<style>
body, html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.container {
margin: auto;