Skip to content

Instantly share code, notes, and snippets.

View bryanculver's full-sized avatar
👋

Bryan Culver bryanculver

👋
View GitHub Profile
@bryanculver
bryanculver / four-corners.js
Created April 29, 2024 20:02
A custom layout for Amethyst that arranges windows in four corners, with special handling for more than and less than 4 windows.
function layout() {
return {
name: "Four Corners",
getFrameAssignments: (windows, screenFrame) => {
const fullCornerHeight = screenFrame.height / 2;
const fullCornerWidth = screenFrame.width / 2;
let remainderHeight = 0;
const remainderWidth = fullCornerWidth;

No Cache final-dev Build: 2m43s

time docker build --no-cache --target final-dev -t nautodev:local --build-arg PYTHON_VER=3.7 --build-arg PYUWSGI_VER=2.0.20 -f docker/Dockerfile .
[+] Building 161.9s (30/30) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 12.88kB                                                                                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                        0.0s
 => => transferring context: 367B
@bryanculver
bryanculver / createCipher.py
Created September 13, 2019 11:17
A Python Implementation of Node's createCipher Encrypt/Decrypt Function
"""
DO NOT USE THIS IN PRODUCTION! PLEASE USE createCipheriv IN NODE!
OK... If you got this far you're probably like me and got stuck needing to find a way do mimic Node's createCipher.
Seriously though, please don't use this...
See: https://nodejs.org/docs/latest-v10.x/api/crypto.html#crypto_crypto_createcipher_algorithm_password_options
"""
@bryanculver
bryanculver / dyno-spaces.scss
Created March 7, 2018 22:04
Quickly generate margin and padding units as CSS classes.
/*
# Dyno Spaces
Quickly generate margin and padding units as CSS classes.
FORMAT
.r[type][side]-[unit]
EXAMPLE
### Keybase proof
I hereby claim:
* I am bryanculver on github.
* I am bryanculver (https://keybase.io/bryanculver) on keybase.
* I have a public key whose fingerprint is 810B A9FC 788A 8B2C 9EB9 559C 834D 7494 DEDB 1DD8
To claim this, I am signing this object:
@bryanculver
bryanculver / rip_wanlord.txt
Created February 19, 2016 18:42
Requiem of the WANLORD
It was the first, and being first, was best,
but now we lay it down to ever rest.
Now pause with me a moment, shed some tears.
For auld lang syne, for love, for years and years
of faithful service, duty done, I weep.
Lay down thy packet, now, O friend, and sleep.
-Vinton Cerf
@bryanculver
bryanculver / iAShortcut.sh
Created July 1, 2015 01:43
Open iA Writer From Command Line, Regardless If File Exists
# Add this to your ~/.zshrc config file.
# Builds upon:
# https://gist.github.com/adamstac/4271657
# https://gist.github.com/alexcabrera/3345929
# https://gist.github.com/brendanjerwin/996464
ia() { (test -e $1 || touch $1) && open $1 -a /Applications/iA\ Writer\ Pro.app }
# Tested in zsh, should work in other shells as well