Skip to content

Instantly share code, notes, and snippets.

@xacnio
xacnio / telegram_video_sticker_ffmpeg.md
Last active March 27, 2025 06:44
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

brew tap homebrew/cask-fonts
brew install --cask font-cascadia-code
brew install --cask font-cascadia-code-pl
brew install --cask font-cascadia-mono
brew install --cask font-cascadia-mono-pl
@cnlohr
cnlohr / forgot_to_check_out_with_recurse_submodules.md
Last active August 19, 2024 16:58
Git forgot to clone recursively (forgot to check out with recurse submodules)
@ThEMarD
ThEMarD / Update Ubuntu's platform-tools package manually.txt
Last active November 3, 2023 20:09
Update Ubuntu's platform-tools package manually
If you've installed adb and fastboot via apt install on Ubuntu and realize they're old versions, then here is how to manually update them.
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
sudo cp platform-tools/adb /usr/lib/android-sdk/platform-tools/
sudo cp platform-tools/fastboot /usr/lib/android-sdk/platform-tools/
check that it worked with:
adb --version
@amake
amake / innosetup-linux-macos.org
Last active April 7, 2025 08:35
Inno Setup on Linux and macOS

Inno Setup on Linux and macOS

Inno Setup is a popular installer builder for Windows. Of course it is made to run on Windows only, by default. But what if you want to build Windows installers off Windows, i.e. on Linux or macOS?

You’re in luck: It’s possible to run Inno Setup anywhere that Docker runs (including Linux and macOS), and even have a passable experience writing your setup script.

@carceneaux
carceneaux / remove_gitlab_artifacts.sh
Last active March 29, 2025 22:48
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: [email protected]
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#
@enisozgen
enisozgen / is_command_exist.yml
Last active May 8, 2024 02:47
ansible tasks that Checks if a program exists from a Bash script
- name: Check is rvm installed
shell: command -v rvm >/dev/null 2>&1
register: is_rvm_exist
ignore_errors: yes
- debug: msg="{{ is_rvm_exist.rc }}" # it returns rc 1
- debug: var=is_rvm_exist
- name: Check is ls installed
shell: command -v ls >/dev/null 2>&1
@mohanraj-r
mohanraj-r / scp-speed-test.sh
Last active August 10, 2024 13:59
[speed test] Test ssh connection speed
#!/bin/bash
# scp-speed-test.sh
# Author: Alec Jacobson alecjacobsonATgmailDOTcom
# http://www.alecjacobson.com/weblog/?p=635
#
# Test ssh connection speed by uploading and then downloading a 10000kB test
# file (optionally user-specified size)
#
# Usage:
# ./scp-speed-test.sh user@hostname [test file size in kBs]
@justincjahn
justincjahn / README.md
Last active January 16, 2024 20:15
Minecraft server(s) using systemd and screen.

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@ppo
ppo / regex-ecma-262-5_1.txt
Last active September 10, 2024 15:36
Validation Regex ECMA-262 5.1 (date and/or time with optional timezone)
Format: YYYY-MM-DDTHH:mm:ss.sssZ
Date: ^\d{4}(-\d{2}){0,2}$
Time: ^\d{2}(:\d{2}(:\d{2}(\.\d+)?)?)?$
Time with optional timezone: ^\d{2}(:\d{2}(:\d{2}(\.\d+)?)?)?(Z|[\+|-]\d{2}:\d{2})?$
Date and/or time with optional timezone:
(^\d{4}(-\d{2}){0,2})?((^|T)\d{2}(:\d{2}(:\d{2}(\.\d+)?)?)?(Z|[\+|-]\d{2}:\d{2})?)?$