Skip to content

Instantly share code, notes, and snippets.

@xacnio
xacnio / telegram_video_sticker_ffmpeg.md
Last active July 22, 2024 12:31
Telegram - Create Video Sticker (.WEBM) with FFMPEG

Command

ffmpeg -y -i animated_sticker.mov -r 30 -t 2.99 -an -c:v libvpx-vp9 -pix_fmt yuva420p -s 512x512 -b:v 400K output.webm
  • If .webm file size greater than 256 KB, you should reduce "-b:v 400K"
  • .mov video file may has alpha channel but not required.
  • My video sticker pack for example: https://t.me/addstickers/msn_animations

Telegram Sticker Command

@digilink
digilink / container_deploy.yml
Created July 8, 2021 23:01
Ansible Proxmox LXC deploy
---
- name: Proxmox lxc provision
hosts: pxsrv01
tasks:
- name: Create new container
proxmox:
vmid: '{{ vmid }}'
api_user: root@pam
api_token_id: root-ansible-token
@emmanuelkehinde
emmanuelkehinde / DropdownSelector.swift
Created May 9, 2021 11:57
Reusable Dropdown selector using SwiftUI
import SwiftUI
struct DropdownOption: Hashable {
let key: String
let value: String
public static func == (lhs: DropdownOption, rhs: DropdownOption) -> Bool {
return lhs.key == rhs.key
}
}
@davidhq
davidhq / mpv_install.md
Last active July 4, 2024 07:37
mpv ◈ Media Player binary -- Install macOS / linux / windows
//Orginal code from: https://gist.github.com/mecid/f8859ea4bdbd02cf5d440d58e936faec
//I just made some modification in appearnce, show monthly navigator and weekdays.
import SwiftUI
struct ContentView: View {
@Environment(\.calendar) var calendar
private var year: DateInterval {
calendar.dateInterval(of: .month, for: Date())!
@zonca
zonca / concat_mp4.sh
Last active May 9, 2023 06:39
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
@mikestecker
mikestecker / optimising-unifi-performance.md
Last active April 22, 2024 13:32
optimising-unifi-performance

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.
@Webreaper
Webreaper / docker-compose.yml
Last active July 26, 2024 13:44
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB
@mecid
mecid / Calendar.swift
Last active July 10, 2024 09:17
SwiftUI Calendar view using LazyVGrid
import SwiftUI
extension Calendar {
func generateDates(
inside interval: DateInterval,
matching components: DateComponents
) -> [Date] {
var dates: [Date] = []
dates.append(interval.start)