Skip to content

Instantly share code, notes, and snippets.

@calvinbui
calvinbui / rpl.py
Last active October 20, 2022 14:04
FreeNAS Replication Details
"""
FreeNAS Replication status
"""
import os
import time
import sys
from datetime import datetime, timedelta
def bytes_to_gb(filesize):
return filesize / 1024 / 1024 / 1024
@0Camus0
0Camus0 / LinuxWayland.cpp
Created February 11, 2018 04:53
Wayland
#include <video/GLDriver.h>
#include <core/LinuxFramework.h>
#include <stdio.h>
#include <sys/time.h>
extern int g_AvoidInput;
extern std::vector<std::string> g_args;
namespace t800 {
#ifdef USING_WAYLAND_NATIVE
struct wl_compositor *wlnd_compositor = 0;
@kowalcj0
kowalcj0 / install_MKVToolNix_and_handbrake.sh
Created July 2, 2017 16:08
Run HandBrake & MKVToolNix on a headless FreeBSD jail (FreeNas)
# 1 - Create a jail called `convert` using `pluginjail-10.3` template
# 2 - list all jails
jls
JID IP Address Hostname Path
1 - convert /mnt/volume/jails/convert
# 3 - connect to our jail
jexec 1 sh
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active October 15, 2025 12:10
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active January 10, 2026 17:56
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@mRB0
mRB0 / ntfs-find-files-affected-by-ddrescue-bad-chunks.py
Created March 19, 2016 18:43
After you use gnu ddrescue on a drive with an NTFS filesystem, this script uses your ddrescue logfile & ntfs-3g to list files affected by unrecoverable bad chunks
#!/usr/bin/env python
import sys
import os
import subprocess
import re
from StringIO import StringIO
# usage:
#
@bkaradzic
bkaradzic / orthodoxc++.md
Last active January 14, 2026 10:51
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@joepie91
joepie91 / vpn.md
Last active January 12, 2026 02:35
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@YamashitaRen
YamashitaRen / 10-Bit H.264
Last active April 23, 2025 16:26
10-Bit H.264 explanation
10-Bit H.264
For all those who haven’t heard of it already, here’s a quick rundown about the
newest trend in making our encodes unplayable on even more systems: So-called
high-bit-depth H.264. So, why another format, and what makes this stuff
different from what you know already?
First off: What is bit depth?
In short, bit depth is the level of precision that’s available for storing color
information. The encodes you’re used to have a precision of 8 bits (256 levels)
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule