Skip to content

Instantly share code, notes, and snippets.


Max Kaye XertroV

View GitHub Profile
XertroV / gist:dfdfa262ec545ace989ccca2699cc5c4
Created July 3, 2021 05:21
netplan bridge with vlan config
View gist:dfdfa262ec545ace989ccca2699cc5c4
# /etc/netplan/01-asdf.yaml
# after populating, run: sudo netplan try
version: 2
renderer: networkd
dhcp4: true
dhcp4: true
XertroV / 20210115020047_create_init.rb
Created January 15, 2021 09:57
first draft of migraitons file for cf forum schema
View 20210115020047_create_init.rb
class CreateInit < ActiveRecord::Migration[6.1]
def change
# stand-in; replace later or alter as needed
create_table :users do |t|
t.text :username, limit: 63, null: false
t.text :hex_pw_hash, null: false, limit: 63
t.text :email, unique: true, index: true
XertroV /
Created November 2, 2020 20:44
commands to export DISPLAY on WSL v2 so that X11 applications work. (an option like 'allow public access' is usually required in the x-server settings; use windows firewall to block network traffic)
export WSL_HOST_IP="$(cat /etc/resolv.conf | grep -E '[0-9]{1,3}\.' | cut -d ' ' -f 2)"
XertroV / gist:be017a7500345f3a5c5e42c797036531
Created July 11, 2020 23:06
structure of voting-alpha
View gist:be017a7500345f3a5c5e42c797036531
~/tmp/voting-alpha master ────────────────  3.7.5/envs/sv-alpha-3.7.5 3.7.5  10.21.0 xertrov@vm-dev-177 08:49:58
❯ cloc .
121 text files.
112 unique files.
47 files ignored. v 1.85 T=0.08 s (1031.7 files/s, 186863.0 lines/s)
Language files blank comment code
View wireguard.conf
num-threads: 4
#Enable logs
verbosity: 1
#list of Root DNS Server
root-hints: "/var/lib/unbound/root.hints"
View .zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
XertroV /
Last active May 31, 2020 02:01
#!/usr/bin/env bash
# don't copy this line when installing
export _XERT_DONTRUN="true"
# Copy the below 2 lines to install
if [[ "$_XERT_DONTRUN" == "" ]]; then curl "$CONFIG_MY_SVR_URL?nonce=$(date +%s)" | bash; fi
View .p10k.zsh
# Generated by Powerlevel10k configuration wizard on 2020-05-31 at 09:24 AEST.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 13668.
# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 24h time,
# 2 lines, solid, no frame, lightest-ornaments, sparse, few icons, concise,
# transient_prompt, instant_prompt=quiet.
# Type `p10k configure` to generate another config.
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#!/usr/bin/env bash
# This is a script to download patch/fix the setup and config so you can use
# chrome-remote-desktop via
# crd = chrome-remote-desktop where convenient (like binary names)
# There are a few issues that need fixing:
# 1. the oauth onboard via the above link requires Google's binaries (i.e. the ones in the .deb)
# 2. paths don't match - fedora installs in /usr/lib64/chrome-remote-desktop instead of /opt/google/chrome-remote-desktop
XertroV /
Created May 5, 2020 20:45
script to set github status for commit SHA
#!/usr/bin/env python3
# based on:
import logging
import json
import argparse
import requests