Skip to content

Instantly share code, notes, and snippets.

@ivan-leschinsky
ivan-leschinsky / mpv_install.md
Created July 4, 2024 07:37 — forked from davidhq/mpv_install.md
mpv ◈ Media Player binary -- Install macOS / linux / windows
@ivan-leschinsky
ivan-leschinsky / appify.sh
Created October 17, 2023 07:35 — forked from splaisan/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/bin/bash
# script: appify.sh
# minor edits from https://gist.github.com/advorak/1403124
# usage and cli args
usage="Creates the simplest possible Mac app from a shell script.\n\
Usage: `basename "$0"` -s <shell-script.sh> -n <app-name>\n\
[optional: -i <icon.icn> -h <help>]\n\
\n\
@ivan-leschinsky
ivan-leschinsky / concat_mp4.sh
Created May 9, 2023 06:39 — forked from zonca/concat_mp4.sh
FFMPEG scripts to speedup and concatenate videos, useful for prerecording videos for conferences
ffmpeg -safe 0 -f concat -i <(find . -type f -name '*.mp4' -printf "file '$PWD/%p'\n" | sort) -c copy output.mp4
@ivan-leschinsky
ivan-leschinsky / !proxmox_setup.sh
Created December 17, 2022 17:05 — forked from ilude/proxmox-setup-notes.md
How to setup a community version of Proxmox VE 5.x-7.x
# copy and paste oneliner below to run
# curl -s https://gist.githubusercontent.com/ilude/32aec45964bc1207810f7e6e49544064/raw/%21proxmox_setup.sh?$(date +%s) | /bin/bash -s
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
# setup no nag script to run on upgrade
@ivan-leschinsky
ivan-leschinsky / Video encoding with FFmpeg.md
Created November 17, 2022 19:49 — forked from Aldaviva/Video encoding with FFmpeg.md
Video encoding with FFmpeg, a great tool with the shittiest user interface you can imagine: lots of confusing, unmemorable, unintuitive, undiscoverable command-line flags

Remux without transcoding

ffmpeg -i input.ts -c copy output.mp4

x264, AAC

ffmpeg -i input.avi -c:v libx264 -preset slow -crf 18 -pix_fmt yuvj420p -c:a aac -b:a 160k output.mp4

optimising-unifi-performance

NOTE: Content below is written by Adrian Mace. Click here for an updated version.

Below are the key settings that I apply on any unifi installation for optimal performance.

Settings

Settings > Site

  • Ensure Enable Advanced Features is enabled
    This allows you to follow along with the guide in it's entirety.
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
// Bot for http://gabrielecirulli.github.io/2048/
FakeActuator = function() {}
FakeActuator.prototype.actuate = function () {
}
score = 0;
max = 0;
maxReach = 512;
@ivan-leschinsky
ivan-leschinsky / node.service
Created January 30, 2018 21:14 — forked from Dianoga/node.service
systemd .service file for node.js app. Requires forever.
[Unit]
Description=Start Herir Node.js Service
Requires=network.target
After=network.target
[Service]
Type=forking
WorkingDirectory=/srv/hereir/node
ExecStart=/usr/bin/forever start --pidFile /var/run/hereir.pid HereIR.js
ExecStop=/usr/bin/forever stop HereIR.js
@ivan-leschinsky
ivan-leschinsky / git-commit-log-stats.md
Created December 6, 2017 07:40 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.