Skip to content

Instantly share code, notes, and snippets.

View bcrisp4's full-sized avatar

Ben bcrisp4

  • United Kingdom
View GitHub Profile
@bcrisp4
bcrisp4 / textproto.jinja2
Last active June 21, 2022 21:59
Jinja2 template for textproto config format used by Bazel Buildfarm
{#-
This template attempts to produce an output that conforms to the
notoriously poorly documented "textproto" (human-readable protobuf)
format, as used by Bazel Buildfarm for config files.
#}
{%- macro write_boolean(key, value) %}
{%- if value is sameas true %}
{{ key }}: true
{%- else %}
{{ key }}: false
@bcrisp4
bcrisp4 / README.md
Last active November 7, 2022 03:20
Jinja2 template for Nginx config

Jinja2 template for Nginx config

Mappings/dicts are transformed into Nginx blocks. You can nest dicts to nest blocks. The macro will recurse through the nested dicts.

http:
  server:
    location /: {}
    location /api: {}
@bcrisp4
bcrisp4 / kitty.desktop
Created June 26, 2019 00:10
Kitty Desktop entry
[Desktop Entry]
Version=1.0
Type=Application
Name=kitty
GenericName=Terminal emulator
Comment=A fast, feature full, GPU based terminal emulator
TryExec=kitty
Exec=kitty
Icon=kitty
Categories=System;TerminalEmulator;
@bcrisp4
bcrisp4 / kitty-centos7-build.txt
Last active August 17, 2022 04:52
Kitty terminal CentOS 7 build from source
# Get Python 3.6:
$ sudo yum -y install centos-release-scl
$ sudo yum -y install rh-python36
# Install dependencies with yum:
$ sudo yum -y install gcc git harfbuzz harfbuzz-devel zlib libpng libpng-devel freetype fontconfig fontconfig-devel ImageMagick libXi libXi-devel libX11 libX11-devel libXcursor libXcursor-devel libXinerama libXinerama-devel libXrandr libXrandr-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel dbus-devel rh-python36-python-pygments
# Launch new shell with Python 3.6 using SCL
$ scl enable rh-python36 bash