Skip to content

Instantly share code, notes, and snippets.

View SteveByerly's full-sized avatar

Steve Byerly SteveByerly

  • Metis Genetics
  • Spokane, WA
View GitHub Profile
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 6px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
@SteveByerly
SteveByerly / gist:a3629148441e742e0b13
Created November 12, 2014 16:34
Reportlab basic doc with table example
import io
from reportlab.lib import colors
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Table
from reportlab.platypus.tables import TableStyle
def make_doc():
pdf = io.BytesIO()
@SteveByerly
SteveByerly / aws.plugin.zsh
Created March 14, 2017 20:15
Custom version of aws ZSH plugin
_homebrew-installed() {
type brew &> /dev/null
}
_awscli-homebrew-installed() {
brew list awscli &> /dev/null
}
export AWS_HOME=~/.aws
@SteveByerly
SteveByerly / SCSS.md
Created July 16, 2017 00:47 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@SteveByerly
SteveByerly / vscode-styles.css
Last active August 8, 2017 19:28
vscode-styles for operator mono, fira code ligatures, and oceanic next italic
.type.storage,.type.storage.declaration, .storage.class.modifier {
font-family: 'Operator Mono Book';
}
.type.storage.arrow.function {
font-family: 'Operator Mono Book'
}
.token.keyword.operator {
font-family: 'Operator Mono Book'
@SteveByerly
SteveByerly / aws_assume_role
Created August 9, 2017 23:12 — forked from dukejones/aws_assume_role
Workaround AWS CLI lack of support for IAM assume-role
#!/bin/bash
set -e
usage () {
cat <<DOCUMENTATIONXX
Usage : $0 PROFILE_NAME COMMAND
This tool will take a named profile from your ~/.aws/credentials with only
a "role_arn = " line and no source profile, get temporary credentials for
the profile, and execute the rest of the parameters as a command with the
@SteveByerly
SteveByerly / virtualenvwrapper.plugin.zsh
Created September 25, 2017 06:36
Custom version of virtualenvwrapper ZSH plugin with special handling for pipenv
virtualenvwrapper='virtualenvwrapper.sh'
if (( $+commands[$virtualenvwrapper] )); then
function {
setopt local_options
unsetopt equals
if [ "$PIPENV_ACTIVE" != '1' ]; then
source ${${virtualenvwrapper}:c}
fi
}
@SteveByerly
SteveByerly / Makefile
Created October 3, 2019 18:22
Makefile for managing a Terraform project
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := help
.SUFFIXES:
# ---------------------------------------------------------
# Local Variables
# ---------------------------------------------------------

Keybase proof

I hereby claim:

  • I am stevebyerly on github.
  • I am stevebyerly (https://keybase.io/stevebyerly) on keybase.
  • I have a public key ASDSVZItHkBDafzgWBTtO2Dzn3B1VaSrqlWcfISUOAhFOAo

To claim this, I am signing this object:

@SteveByerly
SteveByerly / restore_db.sql
Created September 24, 2020 22:16
MS Sql Server script for restoring a backup with unknown file contents
USE master;
GO
DECLARE @BackupDir NVARCHAR(260);
SET @BackupDir = CAST(ServerProperty(N'InstanceDefaultDataPath') AS NVARCHAR(260));
DECLARE @NewDataPath NVARCHAR(260);
DECLARE @NewLogPath NVARCHAR(260);
SET @NewDataPath = CONCAT(@BackupDir, N'$(DatabaseName)', '_DATA.MDF');
SET @NewLogPath = CONCAT(@BackupDir, N'$(DatabaseName)', '_LOG.LDF');