Skip to content

Instantly share code, notes, and snippets.

View lukassup's full-sized avatar
🍕

Lukas Šupienis lukassup

🍕
  • Lithuania
View GitHub Profile
#!/bin/sh
##
# H.265 (HEVC) codec using NVidia hardware accelleration
#
#ffmpeg \
# -y \
# -vsync 0 \
# -hwaccel cuda -hwaccel_output_format cuda \
# -c:v hevc_cuvid \
alang=eng,en,lit,lt # String list
cache-secs=300.00 # Double (0 to any)
force-window=yes # Choices: no yes immediate
hwdec=vdpau # Choices: no auto yes auto-copy vdpau vdpau-copy videotoolbox videotoolbox-copy vaapi vaapi-copy dxva2 dxva2-copy d3d11va d3d11va-copy rpi rpi-copy mediacodec cuda cuda-copy crystalhd
hwdec-codecs=h264,vc1,wmv3,mpeg2video # h264,vc1,wmv3,hevc,mpeg2video,vp9 # String
idle=once # Choices: no once yes
keep-open=yes # Choices: no yes always
osd-font='Roboto' # String
slang=eng,en,lit,lt # String list
sub-font='Roboto Medium' # String
@lukassup
lukassup / zipapp.md
Last active September 12, 2023 02:17
Python zipapp

Python zipapp web apps

What's a zipapp?

This concept is very much like .jar or .war archives in Java.

NOTE: The built .pyz zipapp can run on both Python 2 & 3 but you can only build .pyz zipapps with Python 3.5 or later.

Initial setup

#!/bin/bash
# vim: set noet sw=4 sts=4 ts=4:
RELEASE='Fedora-Atomic-26-20170821.0'
CHKSUM='Fedora-CloudImages-26-20170821.0-x86_64-CHECKSUM'
IMAGE="$RELEASE.x86_64.qcow2"
SUBNET="88"
printf -v MAC_PREFIX '52:54:00:%02x:00' "$SUBNET"
DOMAIN="cluster"
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
" be cool
colorscheme pablo
" let &background = 'dark'
let &laststatus = 2
let &history = 256
# Use same prefix as GNU Screen
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Reload config file
bind-key r source-file ~/.tmux.conf
# Vi-like pane navigation
bind-key h select-pane -L
#!/bin/bash
# download CloudFlare SSL binaries if needed
CFSSL='cfssl'
hash $CFSSL || {
curl -L -o cfssl https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 \
&& chmod +x cfssl \
&& CFSSL='./cfssl'
# -*- mode: ruby -*-
# vi: set ft=ruby :
CPU = 1
MEM = 512
DOMAIN = 'cluster'
NET_BRIDGE = 'virbr0'
# NOTE: required for VBox linked_clone
Vagrant.require_version '>= 1.8', '<2.0'
#!/bin/bash
# vim: set noet sw=4 sts=4 ts=4:
RELEASE='Fedora-Atomic-25-20170705.0'
CHKSUM='Fedora-CloudImages-25-20170705.0-x86_64-CHECKSUM'
IMAGE="$RELEASE.x86_64.qcow2"
SUBNET="88"
printf -v MAC_PREFIX '52:54:00:%02x:00' "$SUBNET"
DOMAIN="cluster"