Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Brevig AlexanderBrevig

View GitHub Profile
View chroot-to-pi.sh
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@AlexanderBrevig
AlexanderBrevig / gitscanaggregate.go
Created Nov 27, 2019
Gitscan aggregate to TAB separated stream on stdout
View gitscanaggregate.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"path/filepath"
"strings"
)
View Microsoft.PowerShell_profile.ps1
# PowerShell Core, stupid simple
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
View Windows Terminal config
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"profiles": [
{
View config
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
# Configure border style <normal|1pixel|pixel xx|none|pixel>
View gist:9adf9edbc75492094a3747c9eb42c9bc
# execute
# Install-Module PowershellGet -Force
# first time install
# PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
# update with
# PowerShellGet\Update-Module posh-git
Import-Module posh-git
@AlexanderBrevig
AlexanderBrevig / todo.py
Created Mar 28, 2019
An updated module for bumblebee-status that uses todo.sh and lists tasks that are over due
View todo.py
# pylint: disable=C0111,R0903
# place in bumblebee-status/bumblebee/modules/
# https://github.com/tobi-wan-kenobi/bumblebee-status/blob/master/bumblebee/modules/todo.py
"""Displays the number of todo items from a text file
Parameters:
* todo.file: File to read TODOs from (defaults to ~/Documents/todo.txt)
"""
import bumblebee.input
View autoexec.cfg
//rates
cl_interpolate "1"
cl_lagcompensation "1" // (activates client-side lag compensation)
cl_predict "1" // (activates client-side prediction, predicts physics, movement, firing etc)
cl_predictweapons "1" // (activates client-side weapon effects prediction)
cl_interp "0.0" // (interpolation, should always be set to "0")
cl_interp_ratio "1" // (interpolation ratio, "1" = low ping, "2" = higher ping)
cl_cmdrate "128" // (for -tickrate 128 launch option)
cl_updaterate "128" // (for -tickrate 128 launch option)
View powerupdemo.md

Printout of powerupdemo

BASE only has a range, abbreviated as R

ARROW has a range, and a number of projectiles shot

SNIPer has a range, an a rate of fire


@AlexanderBrevig
AlexanderBrevig / snake.py
Last active Nov 2, 2017 — forked from sanchitgangwar/snake.py
Snakes Game using Python
View snake.py
# SNAKES GAME FOR WINDOWS
# Be sure to download http://gnuwin32.sourceforge.net/downlinks/pdcurses-bin-zip.php
# I add the pdcurses.dll to the project folder and off you go!
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import unicurses
from unicurses import *
from random import randint