This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# минимальная частота работы когда яркость долго не меняется | |
min_freq=12 # in seconds | |
# максимальная частота работы когда яркость меняется быстро | |
max_freq=1 # in seconds | |
# текущая частота работы (максимальная частота умноженная на 2) | |
current_freq=$((max_freq * 2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function md5format ($s,$dictionary='0123456789-abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ@') { | |
$base = strlen($dictionary); | |
$md5 = md5($s); | |
$inputs[0] = hexdec(substr($md5,0,15)); | |
$inputs[1] = hexdec(substr($md5,15,1)); | |
$inputs[2] = hexdec(substr($md5,-15)); | |
$result = ''; |