Skip to content

Instantly share code, notes, and snippets.

View melissaboiko's full-sized avatar
🐈

Melissa Boiko melissaboiko

🐈
View GitHub Profile
@yellowled
yellowled / ffmpeg-html5
Created December 6, 2011 19:39
Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg. Will probably convert this to a bash script later, but for the time being, here's some examples. Not sure there have actually sensible dimensions and bitrates for web video.
# webm
ffmpeg -i IN -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s 640x360 OUT.webm
# mp4
ffmpeg -i IN -acodec aac -strict experimental -ac 2 -ab 128k -vcodec libx264 -vpre slow -f mp4 -crf 22 -s 640x360 OUT.mp4
# ogg (if you want to support older Firefox)
ffmpeg2theora IN -o OUT.ogv -x 640 -y 360 --videoquality 5 --audioquality 0 --frontend
@sartak
sartak / a.md
Last active March 22, 2024 22:16
Anki 2 annotated schema
#!/usr/bin/env python
# An `ad-hoc` script to change user interface language
# for Anki2 on Ubuntu 12.04 desktop.
# Usage: anki2-change-defaultLang-to-en.py [lang]
#
# Examples:
# # Change to english interface
# $ anki2-change-defaultLang-to-en.py en
@mosquito
mosquito / README.md
Last active April 18, 2024 11:43
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@mraaroncruz
mraaroncruz / steps.md
Last active April 16, 2024 07:22
Get the Telegram channel ID

To get the channel id

  1. Create your bot with botfather
  2. Make you bot an admin of your channel

Simplest way (via @anhtuank7c)

Go to Telegram web and open a channel, get the ID from -[channel id] from hash in the path

https://web.telegram.org/k/#-9999999999999