Skip to content

Instantly share code, notes, and snippets.

@espio999
espio999 / MP4toGIF-MoviePy.py
Created April 7, 2023 04:02
Convert MP4 to GIF with MoviePy
from moviepy.editor import *
def getCroppedFrames(movie, crop_size, resize_size):
cropped_movie = movie.crop(x1=0, y1=0, width=crop_size["w"], height=crop_size["h"])
resized_movie = cropped_movie.resize(height=resize_size["h"])
return resized_movie
def makeGIF(path, movie, fps, program):
@ShawnHymel
ShawnHymel / quantized-inference-example.py
Last active October 22, 2024 14:11
TensorFlow Lite (TFLite) Python Inference Example with Quantization
# TFLite quantized inference example
#
# Based on:
# https://www.tensorflow.org/lite/performance/post_training_integer_quant
# https://www.tensorflow.org/lite/api_docs/java/org/tensorflow/lite/Tensor.QuantizationParams
import numpy as np
import tensorflow as tf
# Location of tflite model file (float32 or int8 quantized)
@krcm0209
krcm0209 / README.md
Last active July 9, 2025 21:55
Using AdGuard DNS over HTTPS (DoH) on Windows 11

Why

You may want to use AdGuard's DNS over HTTPS[^2] service if you

  1. Want to make it harder for your ISP to know what websites you are requesting
  2. Want to block most traditional ads from your web browsing experience across your entire PC

Setup instructions

  1. Open PowerShell
@gangefors
gangefors / Install FreeNAS SCALE on a partition and create a mirror.md
Last active July 16, 2025 02:09
How to install TrueNAS SCALE on a partition instead of the full disk

Install TrueNAS SCALE on a partition instead of the full disk

The TrueNAS installer doesn't have a way to use anything less than the full device. This is usually a waste of resources when installing to a modern NVMe which is usually several hundred of GB. TrueNAS SCALE will use only a few GB for its system files so installing to a 16GB partition would be helpful.

The easiest way to solve this is to modify the installer script before starting the installation process.

version: '3'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:stable
volumes:
- ./homeassistant_data:/config
environment:
@Zatte
Zatte / Host
Last active November 14, 2024 19:37 — forked from lucndm/Host
Proxmox GPU passthrough to LXC Container
Note : Proxmox 6.1
VI : /etc/apt/sources.list
# security updates
deb http://security.debian.org jessie/updates main contrib
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian jessie pve-no-subscription
@Ghostbird
Ghostbird / build-ffmpeg-nvenc.sh
Last active April 29, 2025 23:30
Automatically compile and install FFMPEG with NVIDIA hardware acceleration on Debian 10+
#!/bin/bash
# Automatically compile and install FFMPEG with NVIDIA hardware acceleration on Debian
# Based on https://www.tal.org/tutorials/ffmpeg_nvidia_encode
# Verified working on Debian 10 and 11
# Abort on error
set -e
suite=stable
@jdah
jdah / .vimrc
Created June 14, 2021 11:54
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@camspiers
camspiers / snap.lua
Last active June 9, 2021 14:31
Example configuration for snap
local snap = require'snap'
local fzy = snap.get'consumer.fzy'
local limit = snap.get'consumer.limit'
local producer_file = snap.get'producer.ripgrep.file'
local producer_vimgrep = snap.get'producer.ripgrep.vimgrep'
local producer_buffer = snap.get'producer.vim.buffer'
local producer_oldfile = snap.get'producer.vim.oldfile'
local select_file = snap.get'select.file'
local select_vimgrep = snap.get'select.vimgrep'
@trungvose
trungvose / nx-structure-angular-nestjs.md
Last active June 20, 2025 17:53
Nx workspace structure for NestJS and Angular

Nx

https://nx.dev/

Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.

Principles