Skip to content

Instantly share code, notes, and snippets.

View rr-'s full-sized avatar
❄️

Marcin Kurczewski rr-

❄️
View GitHub Profile
@ysegorov
ysegorov / PKGBUILD
Last active March 18, 2020 05:51
ArchLinux PKGBUILD for Alcor Micro AU6601 card reader (for Linux kernel 4.16+ only)
# Maintainer: Yuri Egorov <ysegorov@gmail.com> -> https://github.com/ysegorov
_pkgname=au6601
pkgname=${_pkgname}-dkms
pkgver=0.3
pkgrel=1
pkgdesc="PCI driver for Alcor Micro AU6601 Secure Digital Host Controller Interface (uses DKMS to automatically build the au6601-pci kernel module)."
# arch=('i686' 'x86_64')
arch=('x86_64')
url="https://launchpad.net/~iacobs/+archive/ubuntu/au6601/+packages"
@ndarville
ndarville / webm.md
Last active September 30, 2023 18:56
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@hest
hest / gist:8798884
Created February 4, 2014 06:08
Fast SQLAlchemy counting (avoid query.count() subquery)
def get_count(q):
count_q = q.statement.with_only_columns([func.count()]).order_by(None)
count = q.session.execute(count_q).scalar()
return count
q = session.query(TestModel).filter(...).order_by(...)
# Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ...
print q.count()
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@kgriffs
kgriffs / sysctl.conf
Last active April 6, 2024 19:40
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
#
# See also: https://gist.github.com/kgriffs/4027835
#
# Assumes a beefy machine with lots of network bandwidth