Skip to content

Instantly share code, notes, and snippets.

View hhrhhr's full-sized avatar

Dmitry Zaitsev hhrhhr

  • Russia, Veliky Novgorod
View GitHub Profile
@hhrhhr
hhrhhr / w2em.bob.csv
Created February 10, 2017 14:25
parsed hub pins
entityType X Y Z entityName
AlchemyTable -404.70846557617 -798.3857421875 25.471561431885 mq7024_alchemy_table
ArmorRepairTable -1132.4968261719 72.598106384277 51.316051483154 repair_table_bob_3
ArmorRepairTable -20.374904632568 285.32702636719 10.792315483093 repair_table_bob_7
ArmorRepairTable -271.07943725586 643.38385009766 2.8930871486664 repair_table_bob_1
ArmorRepairTable -365.51690673828 -813.21014404297 31.254356384277 mq7024_armor_table
ArmorRepairTable -460.71783447266 -951.64904785156 63.124675750732 repair_table_bob_2
ArmorRepairTable -487.9248046875 -1417.9982910156 91.023025512695 Repair Table
ArmorRepairTable -508.65612792969 -305.91540527344 3.5980970859528 repair_table_bob_6
ArmorRepairTable 35.185459136963 -1748.0291748047 36.432548522949 repair_table_bob_4
@hhrhhr
hhrhhr / ProfileTCC.qbs
Created August 8, 2018 00:56
Qbs profile for Tiny C Compiler and some examples
import qbs
Project {
Profile {
// condition: true
name: "TCC-32"
qbs.toolchainType: "gcc"
qbs.architecture: "x86"
qbs.targetOS: "windows"
qbs.targetPlatform: "windows"
@hhrhhr
hhrhhr / ColorCheckerSG.txt
Last active April 12, 2019 06:04
ColorChecker SG SVG generator
LGOROWLENGTH 12
ORIGINATOR "ColorCheckerSG - November2014 edition and newer"
MANUFACTURER "X-Rite - http://www.xrite.com"
5/11/2015 # Time: 16:08
"i1Pro 2 ; Serial number 1000691"
"MeasurementCondition=M0 Filter=no"
NUMBER_OF_FIELDS 4
@hhrhhr
hhrhhr / invaders_generator.lua
Created November 8, 2018 20:02
Invaders generator for LÖVE
local lg = love.graphics
local rnd = math.random
local canvas
local show_help
local invader_sz
local invader_num
local function hsv2rgb(H, S, V) -- 0...360
local Hi = math.floor(H / 60) % 6
@hhrhhr
hhrhhr / mass_convert.bat
Last active November 18, 2024 14:09
Subnautica Below Zero: map export
@echo off
rem edit paths (input and output)
set MESH_DIR=b:\sub
set WORK_DIR=d:\tmp\subnautica\zero_work
set LUA=E:\devel\lua_x64\lua.exe
set LUA_DIR=%~dp0%
:convert
@hhrhhr
hhrhhr / omiga_generator.lua
Created April 12, 2019 06:42
Omiga's cards generator
--[[ sym num bits
top: RB 2 1
left: /\<> 4 2
right: /\<> 4 2
bottom: RB 2 1
total: 64 6
]]
local MULT = 1
local CARD_NUM = 2^(1+2+2+1) -- =2*4*4*2
local CARD_IN_ROW = 6
@hhrhhr
hhrhhr / stream_parser.lua
Created July 27, 2019 20:41
парсер медиапотока с BB-M2
--[[
lua strea_parser.lua <input> [output]
output - путь к выходному файлу без расширения
]]
assert("Lua 5.3" == _VERSION)
assert(arg[1], "\n\n[ERROR] no input file\n\n")
local r
local function uint8() return string.unpack("B", r:read(1)) end
local function uint16() return string.unpack("H", r:read(2)) end
local function uint32() return string.unpack("I4", r:read(4)) end
@hhrhhr
hhrhhr / main.c
Last active August 14, 2019 23:31
save 8-bit grayscale channels
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "channel.h"
#include "correlator.h"
#include "diff.h"
#include "file.h"
#include "options.h"
@hhrhhr
hhrhhr / appid70_to_csv.lua
Last active August 25, 2019 23:16
парсер .70 файлов в текстовое представление
-- 1 2 3 4 5 6 7 8
---------+---------+---------+---------+---------+---------+---------+---------+
--[[ constants ]]
local YEAR = 2016 -- 1451509200
local EPOCH = os.time({year = YEAR, month = 1, day = 0, hour = 0})
--[[ funcs ]]
@hhrhhr
hhrhhr / 02_test_oqpsk_80k.s.dot.csv
Last active August 25, 2019 23:17
данные полученные от парсера .70 файлов
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 14 columns, instead of 9 in line 6.
t0,t1,year,day,t2,t3,qw,qx,qy,qz,t4,x,y,z
59875.193246159,115144674,2016,1332,115144675,115144673,0.87963420152664,0.0029127567540854,-0.4421321451664,0.17536918818951,115144674,5512346.96875,1439218.15625,4384659.34375
59876.290553864,115144675,2016,1332,115144676,115144674,0.87986153364182,0.0028256245423108,-0.44168135523796,0.17536626756191,115144675,5508479.65625,1436331.6875,4390448.3125
59877.387861916,115144677,2016,1332,115144678,115144676,0.88031709194183,0.0026429765857756,-0.44077056646347,0.17537426948547,115144677,5500726.03125,1430555.8125,4402012.25
59879.657392149,115144678,2016,1332,115144679,115144677,0.88054269552231,0.0025392328388989,-0.44031548500061,0.17538639903069,115144678,5496839.71875,1427666.4375,4407787.0
59880.161369557,115144679,2016,1332,115144680,115144678,0.88077187538147,0.0024503299500793,-0.43985557556152,0.17539101839066,115144679,5492947.21875,1424776.0625,4413557.1875
59881.258677249,115144680,2016,1332,115144681,115144679,0.880999147892,0.0023637062404305,-0.43940424