Skip to content

Instantly share code, notes, and snippets.

View pollend's full-sized avatar
:octocat:
working on random stuff

Michael Pollind pollend

:octocat:
working on random stuff
View GitHub Profile
@nazarhussain
nazarhussain / signed_leb128_encode_decode.py
Last active July 11, 2021 04:20
LEB128 - Base 128 Varints Algorithm
from unsigned_leb128_encode_decode import decode_unsigned_leb128, encode_unsigned_leb128
# Python 3.7.4
def encode_signed_leb128(number):
# Higher multiple of 7
bits_multiple_of_7 = ((number.bit_length() + 7) // 7) * 7
twos_complement = (1 << bits_multiple_of_7) - number
@rokoroku
rokoroku / install-ffmpeg-amazon-linux.sh
Last active September 15, 2021 04:55 — forked from gboudreau/install-ffmpeg-amazon-linux.sh
How to compile ffmpeg on Amazon Linux (EC2)
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@Stephen-Seo
Stephen-Seo / build.gradle
Last active August 31, 2019 18:34
a build.gradle scipt that builds multilib c++ and for windows (mingw-w64) (currently for Gradle 2.2 nightly, check earlier revisions for earlier versions of Gradle compatibility)
apply plugin: 'cpp'
model {
buildTypes {
debug
release
}
platforms {
@ryin
ryin / tmux_local_install.sh
Last active October 2, 2024 14:23
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: