Skip to content

Instantly share code, notes, and snippets.

@scheckley
scheckley / Makevars
Last active September 26, 2023 08:47
.R/Makevars use Zig to compile in place of standard gcc and g++
CFLAGS += -O3 -Wall -pipe -pedantic -std=gnu99
CXXFLAGS += -O3 -Wall -pipe -Wno-unused -pedantic
CC = zig cc
CXX = zig c++
CXXSTD = zig c++
CXX98 = zig c++
CXX11 = zig c++
CXX14 = zig c++
CXX17 = zig c++
@scheckley
scheckley / .vimrc
Last active July 19, 2023 14:17
bare minimal vimrc for working on unfamiliar servers
set backspace=2 " backspace in insert mode works like normal editor
set shiftwidth=2 " indent by 2 spaces when auto-indenting
set softtabstop=2 " indent by 2 spaces when hitting tab
syntax on " syntax highlighting
filetype indent on " activates indenting for files
set autoindent " auto indenting
set number " line numbers
colorscheme desert " colorscheme desert (or retrobox for newer versions of neovim)
set background=dark " dark background for theme
set nobackup " get rid of anoying ~file
@scheckley
scheckley / .tmux.conf
Last active November 27, 2024 10:47
tmux config
# split panes using | and -, make sure they open in the same path
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# open new windows in the current path
bind c new-window -c "#{pane_current_path}"
@scheckley
scheckley / custom.css
Created April 3, 2023 14:57
vivaldi custom css for macos to move tab buttons to rhs, where they should be.
.tab .close { /* move close button to right and always show */
display: inline !important;
order:1 !important;
}
.tab .tab-audio{ /* move audio button to left */
order:-1 !important;
}
.tab .favicon{ /* always show favicon, on Mac it disappears when you mouseover */
@scheckley
scheckley / alacritty.yml
Last active April 19, 2023 15:13
my alacritty config
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
@scheckley
scheckley / git-push.sh
Created February 20, 2023 10:38
git push script
#!/bin/bash
# lifted from https://kevquirk.com/git-commit-and-push-script/
# alias push='~/git-push.sh'
read -p "Commit message: " desc
git add . && \
git add -u && \
git commit -m "$desc" && \
git push
@scheckley
scheckley / bmp280.py
Created June 17, 2022 09:56
Python code for bmp280 sensor board
# Distributed with a free-will license.
# Use it any way you want, profit or free, provided it fits in the licenses of its associated works.
# BMP280
# This code is designed to work with the BMP280_I2CS I2C Mini Module available from ControlEverything.com.
# https://www.controleverything.com/content/Barometer?sku=BMP280_I2CSs#tabs-0-product_tabset-2
import smbus
import time
# Get I2C bus
bus = smbus.SMBus(1)
# BMP280 address, 0x76(118)
@scheckley
scheckley / .fonts.conf
Created May 7, 2022 08:31
font config
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
@scheckley
scheckley / .Xdefaults
Created May 5, 2022 09:07
urxvt Xdefaults
*.font: xft:FuraCode\ Nerd\ Font:style=Medium:size=11
*.internalBorder: 10
*.scrollBar: False
!! Copy Paste & Other Extensions
URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
URxvt.copyCommand: xclip -i -selection clipboard
URxvt.pasteCommand: xclip -o -selection clipboard
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
@scheckley
scheckley / .tmux.conf
Created June 17, 2021 08:52
WSL tmux config. This config uses ctrl+a instead of ctrl+b as this wasn't working with putty. Also remaps split horizontal to dash and split verical to bar
set -g mouse on
set -g history-limit 30000
setw -g alternate-screen on
set -s escape-time 50
set -g prefix ^a
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
unbind %
bind | split-window -h
bind - split-window -v