Skip to content

Instantly share code, notes, and snippets.

View NormTurtle's full-sized avatar
👽
dabbling arround

Omi NormTurtle

👽
dabbling arround
View GitHub Profile

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@derand
derand / index.md
Last active February 23, 2024 19:35
ffmpeg: Create a video countdown

The code below was used to generate the video countdown timers that are available in the following playlist using ffmpeg:

#This example will create a 3 second video, with 100 frames per second and it will print the elapsed and remaining times using a two second accuracy.
fps=100;
seconds=3;
mantissaDigits=2;
upperFont=600;
lowerFont=100;
ffmpeg -loop 1 -i ~/Pictures/Black-Background.png -c:v libx264 -r $fps -t $seconds -pix_fmt yuv420p -vf "fps=$fps,drawtext=fontfile='/usr/share/fonts/urw-base35/C059-Bold.otf':fontcolor=yellow:fontsize=$upperFont:x=(w-text_w)/2:y=(h-text_h)/2:text='%{eif\:($seconds-t)\:d}.%{eif\:(mod($seconds-t, 1)*pow(10,$mantissaDigits))\:d\:$mantissaDigits}',drawtext=fontfile='/usr/share/fonts/urw-base35/C059-Bold.otf':fontcolor=yellow:fontsize=$lowerFont:x=(w-text_w)/2:y=((h-text_h)/2)+$upperFont:text='Elapsed\: %{eif\:(t)\:d}.%{eif\:(mod(t, 1)*pow(10,$mantissaDigits))\:d\:$mantissaDigits}'" "$seconds seconds countdown timer.mp4";
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active July 24, 2024 06:15
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@nainemom
nainemom / subtranslate.lua
Last active April 26, 2024 04:03
MPV script to translate current line of subtitle
-- Simple mpv script to translate subtitle using crow (online) or sdcv (offline) dictionaries.
-- INSTALLATION:
-- To install it, first install crow (https://crow-translate.github.io) and/or sdcv (http://dushistov.github.io/sdcv/) on your marchine with your favorite dicts and then,
-- copy this file to '~/.config/mpv/scripts/' (Linux) or '%AppData%\mpv\scripts\' (Windows).
-- sdcv help:
-- you can download offline dicts from http://download.huzheng.org/Quick/ (or anywhere else) and copy extracted dic folder to '~/.stardict/dic/'
-- CONFIGURATION:
local config = {
@emilianavt
emilianavt / BestVTuberSoftware.md
Last active July 24, 2024 07:25
Best VTuber Software

Best VTuber software

This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.

Additional explanations:

  • iPhone means that an iPhone is basically required
  • iFacialMocap support means that tracking data can be received from the iFacialMocap iPhone app
  • VMC protocol means that the application can send and/or receive tracking data from other VMC protocol capable applications, allowing the combination of multiple tracking methods (e.g. VSeeFace receiving VR tracking from Virtual Motion Capture and iPhone/ARKit face tracking from Waidayo)
  • Tobii means that the Tobii eye tracker is supported
@muniter
muniter / neorg-keybinds.norg
Last active May 11, 2023 14:41
Neorg keybinding
@document.meta
title: Neorg default kemappings
de,cription: comments about neorg default keystrokes
author: muniter
categories:
created: 2021-11-26
version: 0.0.8
@end
/*
* Global Media Controls Panel
* Written by Tam710562
*/
(function () {
'use strict';
const gnoh = {
i18n: {
#!/bin/bash
# Set the function-key lock state on system boot for Fedora 37. Adapted from hglee's solution on Linux Mint:
# https://forums.linuxmint.com/viewtopic.php?p=2247849&sid=dd549cc8f87191b1bf45a5727cdd0fae#p2247849
# Current PARAM and MODULE variables defined for ASUS ExpertBook B5
# Valid values depend on target system.
# Try something like `sudo find / | grep fnlock` or `find /sys/module | grep fn` to locate the relevant system module.
PARAM=fnlock_default