Skip to content

Instantly share code, notes, and snippets.

View androiddrew's full-sized avatar
🎯
Focusing

Drew androiddrew

🎯
Focusing
  • AndroidDrew
  • Michigan
View GitHub Profile
@androiddrew
androiddrew / bit_and_bytes_make.output1
Last active April 13, 2023 15:13
Bits and Bytes on Jetson Orin
mkdir -p build
mkdir -p dependencies
ENVIRONMENT
============================
CUDA_VERSION: 114
============================
NVCC path: /usr/local/cuda-11.4/bin/nvcc
GPP path: /usr/bin/g++ VERSION: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
CUDA_HOME: /usr/local/cuda-11.4
CONDA_PREFIX:
@androiddrew
androiddrew / bot-signup-flow.md
Created March 28, 2021 01:58 — forked from maxtaco/bot-signup-flow.md
New bot signup flow

Get a Bot Token

As your keybase user run:

$ keybase bot token create > /tmp/bot-token

You'll get back a base64 token, like: 6C37sjCBgMNf06Z6oTgixIxHJpja8G-Qp. This is your bot token that allows you to sign up bots.

@androiddrew
androiddrew / keybase.md
Created March 28, 2021 01:39
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

# Allow copy paste with "y"
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
@androiddrew
androiddrew / apistar_util.py
Last active August 14, 2019 17:16
Apistar 0.4 Extended JSON Response, SQLAlchemy Component, and SQLAlchemy Hook
import datetime as dt
import decimal
import typing
from apistar import types
from apistar.http import JSONResponse, Response
from apistar.server.components import Component
from sqlalchemy.engine import Engine
from sqlalchemy.orm import sessionmaker, Session, scoped_session
@androiddrew
androiddrew / bootstrap.sh
Created April 28, 2019 14:25
A bootstrap script for a pip-tools based Python project.
#!/usr/bin/env bash
# setting -e to exit immediately on a command failure.
# setting -o pipefail sets the exit code of a pipeline to that of the rightmost command to exit with a non-zero status, or to zero if all commands of the pipeline exit successfully.
set -eo pipefail
# Most likely you will only need to change the path variables per your project structure.
DEV_REQ_PATH=./
REQ_PATH=./services/cms/
@androiddrew
androiddrew / passwords.sh
Created April 10, 2019 17:35
3 Ways to generate random passwords on Linux
# The recommendation is to always use a 14 character password. No clue why so small.
# Strings are in base 64 so you can type them out on a standard keyboard
#### OpenSSL ####
openssl rand 14 -base64
#### pwgen ####
# pwgen has a lot of options. check man pwgen.
# Creates a single password
@androiddrew
androiddrew / .pre-commit-config.yaml
Created March 8, 2019 16:44
A basic pre-commit config file for python
defualt_stages: [commit, push]
fail_fast: true
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
$orange: #f99e1a; //rgb(249,158,26)
$gray: #43484c; //rgb(67,72,76)
$navy-blue: #405275; //rgb(64,82,117)
$light-blue: #218ffe; //rgb(33,143,254)
$black: #000000; //rgb(0,0,0)
@androiddrew
androiddrew / apistar_forms.py
Created May 19, 2018 17:29
Re-implementing the Multi-part Form Parser in APIStar >= 0.4
import io
import typing
from apistar import Component, http
from apistar.server.wsgi import WSGIEnviron
from werkzeug.datastructures import ImmutableMultiDict
from werkzeug.formparser import FormDataParser
from werkzeug.http import parse_options_header
from werkzeug.wsgi import get_input_stream
RequestStream = typing.NewType('RequestStream', io.BufferedIOBase)