Skip to content

Instantly share code, notes, and snippets.

View levochkaa's full-sized avatar
👽

Lev Poznyakov levochkaa

👽
View GitHub Profile
@daniel-rueda
daniel-rueda / CertificatePinningURLSessionDelegate.swift
Last active April 5, 2024 05:52
Certificate and Public Key Pinning for URLSession using Swift
// Based on https://code.tutsplus.com/articles/securing-communications-on-ios--cms-28529
import Foundation
import Security
struct Certificate {
let certificate: SecCertificate
let data: Data
}
@ethanhuang13
ethanhuang13 / FacebookAuth.swift
Last active October 3, 2024 12:26
FacebookAuth is for iOS app developers who need to support Facebook login but don't want to use the official SDK
//
// FacebookAuth.swift
// GitHub: ethanhuang13
// Twitter: @ethanhuang13
import AuthenticationServices
import SafariServices
/*
Updated:
@xacnio
xacnio / telegram_video_sticker_ffmpeg.md
Last active November 17, 2024 23:57
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

@kirillshevch
kirillshevch / telegram_animated_sticker_ffmpeg.md
Last active November 18, 2024 00:04
How to convert video into Telegram Animated Sticker with FFmpeg (WEBM)

How to convert video into Telegram Animated Sticker with FFmpeg (WEBM)

ffmpeg -y -i input.mov -r 30 -t 2.99 -an -c:v libvpx-vp9 -pix_fmt yuva420p -vf 'scale=512:512:force_original_aspect_ratio=decrease' output.webm

Here is a breakdown of the options:

-y - Overwrite the output file if it already exists.