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
@SteveByerly
SteveByerly / debug-process_activity.sql
Last active November 15, 2022 20:32
postgresql utils
/*
* Current activity of all server processes
*/
SELECT
pid
, query
, application_name
, usename AS user_name
, state
, wait_event_type
@SteveByerly
SteveByerly / interview-questions.md
Created July 13, 2021 18:10 — forked from jvns/interview-questions.md
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@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');

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 / 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
# ---------------------------------------------------------
@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 / 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 / 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 / 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 / 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