Skip to content

Instantly share code, notes, and snippets.

View harakka's full-sized avatar
🥔

Antti Riikonen harakka

🥔
  • Finland
View GitHub Profile
@harakka
harakka / fun.txt
Last active February 2, 2024 21:29
find data/json/ -iname "*.json" | xargs jq -c 'map(select(.type=="COMESTIBLE" and (.fun != null))) | .[] | {id: .id, fun: .fun}' > fun.txt
e{"id":"feces_bird","fun":-25}
{"id":"brew_mycus_wine","fun":4}
{"id":"brew_marloss_wine","fun":4}
{"id":"brew_whiskey","fun":-15}
{"id":"wash_whiskey","fun":2}
{"id":"brew_gin","fun":-15}
{"id":"gin_mash","fun":2}
{"id":"brew_sake","fun":-5}
{"id":"brew_soy_sauce","fun":-15}
{"id":"soy_sauce_unstrained","fun":-15}
@harakka
harakka / 12bit-rainbow.json
Last active February 4, 2023 12:18
Cataclysm: Dark Days Ahead theme based on https://iamkate.com/data/12-bit-rainbow/
[
{
"type": "colordef",
"BLACK": [4, 4, 22],
"DGRAY": [92, 92, 92],
"GRAY": [132, 132, 132],
"WHITE": [211, 211, 211],
"MAGENTA": [102, 51, 153],
"LMAGENTA": [136, 17, 119],
"RED": [170, 51, 102],
<?php
/**
* @package ARPSMissions
*/
/*
Plugin Name: ARPSMissions
Description: Creates and manages ArmA2-mission related posts, based on files with the Folk naming scheme.
Version: 1.0.0
Author: Antti 'harakka' Riikonen
License: Modified BSD license
@harakka
harakka / cam_and_display_show_stats.py
Created November 12, 2020 09:41
Hacky script to display data on Raspi-connected oled screen and motioneye overlay. Need to rewrite this into separate polling/data collection and consumer components.
#!/usr/bin/python
# Original file: https://github.com/adafruit/Adafruit_Python_SSD1306/blob/master/examples/stats.py
# Modified by Antti 'harakka' Riikonen for personal use, to display readings
# from AM2302 sensor, the library for which is also from Adafruit. You rock.
# Original license follows.
# Copyright (c) 2017 Adafruit Industries
# Author: Tony DiCola & James DeVito
#

Keybase proof

I hereby claim:

  • I am harakka on github.
  • I am harakka (https://keybase.io/harakka) on keybase.
  • I have a public key ASAMsqCW776Qyj3vs9_5tw7RNoRLLUTBrW-y6vE6LqZkrwo

To claim this, I am signing this object:

@harakka
harakka / motioneye-recompress.sh
Last active January 23, 2020 20:48
Recompresses motioneye-generated mp4 files after creation event to save space
#!/bin/sh
# MIT License
# Copyright (c) 2019 Antti Riikonen
# 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
@harakka
harakka / csvdump.sqf
Last active February 20, 2020 06:06
Dump Arma 3 equipment configs from ingame to csv output in log file. Used primarily to generate diffs for Arma 3 equipment changes between versions when the game was still in major development.
// todo: figure out common class for bipod/tripod
_allCfgs = [];
{
for "_i" from 0 to ((count _x) -1) do {
_item = _x select _i;
_cfgName = configName(_item);
if (isClass _item && getText(_x >> _cfgName >> "displayName") != "" && getText(_x >> _cfgName >> "picture") != "") then {
_allCfgs = _allCfgs + [([_item] call BIS_fnc_configPath)];