Skip to content

Instantly share code, notes, and snippets.

View bryanculver's full-sized avatar
👋

Bryan Culver bryanculver

👋
View GitHub Profile
@bryanculver
bryanculver / center-focus.js
Created November 11, 2024 03:26
An Amethyst Layout Which Aids in Focus
function layout() {
return {
name: "Center Focus",
getFrameAssignments: (windows, screenFrame) => {
if (screenFrame.width < 1800) {
// If the screen is too small, just use a 2-side-by-side layout
const gridWidth = screenFrame.width / 2;
const focusWidth = gridWidth;
const gutterWidth = gridWidth;
const rightGutterOffsetX = screenFrame.x + focusWidth;
@bryanculver
bryanculver / amethyst-layouts.md
Last active November 23, 2024 04:45
Custom layouts for Amethyst that arranges windows in four corners or a center focused window and grid-style sides.

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