Skip to content

Instantly share code, notes, and snippets.

View entrity's full-sized avatar

Markham Anderson entrity

View GitHub Profile
@probonopd
probonopd / Wayland.md
Last active April 23, 2024 23:39
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@Artoria2e5
Artoria2e5 / devise.zh-CN.yml
Last active December 5, 2023 04:35
Devise 4.2.6 zh files
# Chinese (China) translations for Devise 4.2.1
# 4.2.0: By HealthGrid at https://gist.github.com/HealthGrid/2d702b38aa6ffe0233f27d3d5be9250f
# 4.2.1: By Artoria2e5 (this file)
# - Fixes pluralization problems (zh only takes "other")
# - Misc translation improvements, you know what these grammar things are.
# - Should be minor enough to claim CC0 for my changes.
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
zh-CN:
devise:
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 16, 2024 22:32
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@alexeygrigorev
alexeygrigorev / vimeo-download.py
Created September 17, 2016 09:09
Downloading segmented video from vimeo
import requests
import base64
from tqdm import tqdm
master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1'
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1]
resp = requests.get(master_json_url)
content = resp.json()
# Usage:
# curl https://gist.githubusercontent.com/entrity/5462105/raw/..linux-setup.sh | bash
# Installs
# - .gitconfig
# - .ssh/config
# - .bash_aliases
src=https://gist.githubusercontent.com/entrity/5462105/raw
wget -O ~/.gitconfig $src/.gitconfig
@torsten
torsten / proxy.rb
Last active March 12, 2023 21:44
A quick HTTP proxy server in Ruby.
#!/usr/bin/env ruby
# A quick and dirty implementation of an HTTP proxy server in Ruby
# because I did not want to install anything.
#
# Copyright (C) 2009-2014 Torsten Becker <torsten.becker@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,