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
{:ok , name, nodes} = :mnesia.activate_checkpoint([{:max, :mnesia.system_info(:tables)}]) | |
:ok = :mnesia.backup_checkpoint(name, 'backup0.bak') |
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
#!/usr/bin/env zsh | |
echo "This script patches MS Teams on macOS to allow virtual cameras like OBS" | |
sudo codesign --remove-signature "/Applications/Microsoft Teams.app" | |
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper.app" | |
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (GPU).app" |
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/sh | |
# Call the script with single argument like this | |
# ./capture-usb-video.sh out.avi | |
ffmpeg -f avfoundation \ | |
-rtbufsize 100M \ | |
-video_size 1920x1080 \ | |
-pixel_format nv12 \ | |
-framerate 30 \ |
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
deps_dirs: | |
- "_build/default/lib/*" | |
diagnostics: | |
enabled: | |
- xref | |
disabled: | |
- dialyzer | |
include_dirs: | |
- "include" | |
- "_build/default/lib" |
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
{elvis, | |
[#{dirs => ["apps/*/src", "src"], | |
filter => "*.erl", | |
rules => [{elvis_style, line_length, | |
#{ignore => [], | |
limit => 100, | |
skip_comments => false}}, | |
{elvis_style, no_tabs}, | |
{elvis_style, no_trailing_whitespace}, | |
{elvis_style, macro_names, #{ignore => []}}, |
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
from html.parser import HTMLParser | |
import http.client | |
from http.client import HTTPException | |
import json | |
import os | |
from urllib.parse import urljoin | |
SRI_HOST = "lietus.lv" | |
TELEGRAM_API_HOST = "api.telegram.org" |
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
(defn align-y | |
"docstring" | |
[driv] | |
(let [y (@tel/telem :y) | |
vy (@tel/telem :vy)] | |
(if (pos? y) | |
(when (or (> (math/abs y) deadzone) | |
(pos? vy)) | |
(translate driv "left")) | |
(when (or (> (math/abs y) deadzone) |
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
(defn align-pitch-rot | |
"Align rotation on pitch axis." | |
[driv] | |
(if (pitch-within-error?) | |
(kill-pitch-rot driv) | |
(align-pitch driv)) | |
(recur driv)) |
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
(defn poll | |
"Poll telemetry and update the state." | |
[driv] | |
(if true | |
(do | |
(Thread/sleep poll-interval) | |
(let [t (System/currentTimeMillis) | |
dt (* (+ poll-interval (- t (@telem :t))) 0.001) | |
x (get-x driv) | |
y (get-y driv) |
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
;; Yaw | |
(defn get-yaw-delta | |
"" | |
[driv] | |
(let [yaw-delta-q (query driv {:css "#yaw > div.error"}) | |
yaw-delta (get-element-text-el driv yaw-delta-q)] | |
(parse-delta yaw-delta))) | |
(defn get-yaw-rate |