Skip to content

Instantly share code, notes, and snippets.

View danirukun's full-sized avatar
:octocat:
Processing...

danirukun danirukun

:octocat:
Processing...
View GitHub Profile
@danirukun
danirukun / erlang_ls.config
Created September 29, 2020 17:51
Standard Erlang language server project configuration file
deps_dirs:
- "_build/default/lib/*"
diagnostics:
enabled:
- xref
disabled:
- dialyzer
include_dirs:
- "include"
- "_build/default/lib"
@danirukun
danirukun / capture-usb-video.sh
Last active February 17, 2021 17:14
Capture USB video device with FFmpeg on macOS from Rule capture card
#!/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 \
@danirukun
danirukun / patch-ms-teams.sh
Created March 1, 2021 16:17
Patch MS Teams on macOS to detect non-USB only video input devices
#!/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"
@danirukun
danirukun / backup.exs
Created April 9, 2021 13:27
Simple Elixir mnesia table backup
{:ok , name, nodes} = :mnesia.activate_checkpoint([{:max, :mnesia.system_info(:tables)}])
:ok = :mnesia.backup_checkpoint(name, 'backup0.bak')
#!/bin/sh
# Capture video from a UVC compliant webcam in a specific format and playback using ffplay
ffplay -f avfoundation \
-video_size 1920x1080 \
-framerate 30 \
-probesize 21M \
-pixel_format nv12 \
-i "H264:none"
@danirukun
danirukun / yt-clip.sh
Created May 17, 2021 21:08
Download YT VOD in timestamp interval
youtube-dl -f "(bestvideo+bestaudio/best)[protocol!*=dash]" --external-downloader ffmpeg --external-downloader-args "-ss 00:00:00 -to 00:00:00" "youtube link"
@danirukun
danirukun / .init.el
Created July 22, 2021 13:51
Dan's emacs config
;; Author: Daniils Petrovs
;; You will most likely need to adjust this font size for your system!
(defvar efs/default-font-size 180)
(defvar efs/default-variable-font-size 180)
;; Make frame transparency overridable
(defvar efs/frame-transparency '(100 . 100))
(set-frame-parameter (selected-frame) 'alpha '(100 100))
(add-to-list 'default-frame-alist '(alpha 100 100))
@danirukun
danirukun / discord-remove-signature.sh
Created September 7, 2021 14:25
Allow virtual webcam for Discord on macOS
sudo codesign --remove-signature /Applications/Discord.app/Contents/Frameworks/Discord\ Helper\ \(GPU\).app /Applications/Discord.app/Contents/Frameworks/Discord\ Helper\ \(Plugin\).app /Applications/Discord.app/Contents/Frameworks/Discord\ Helper\ \(Renderer\).app /Applications/Discord.app/Contents/Frameworks/Discord\ Helper.app

How to install Hercules source code analysis setup in 2022

Requirements

  • Python 3.7.10 or older
  • Tensorflow 1.14 or older
  • Labours 10.7.2 or older
python -m pip install tensorflow==1.14.0 labours==10.7.2
@danirukun
danirukun / foo.el
Created January 15, 2022 17:29
Example of a universal Emacs Package script
#!/usr/bin/env emacs --script
;;; foo.el --- Foo development and productivity utils -*- lexical-binding: t; -*-
;;;;; Commands
;;;###autoload
(defun bar ()
"Print foo bar."
(interactive)
(message "Foo Bar!"))