Skip to content

Instantly share code, notes, and snippets.

Avatar
🤸

Amanda Falke abstractmachines

🤸
View GitHub Profile
View go-receiver-and-factories.go
// Receiver arguments: https://tour.golang.org/methods/1
// Factory patterns:
// https://www.sohamkamani.com/golang/2018-06-20-golang-factory-patterns/
// https://stackoverflow.com/questions/49712313/golang-factory-method
package main
import "fmt"
type Instrument struct {
@abstractmachines
abstractmachines / concurrency-parallelism.md
Last active May 27, 2021
Concurrency versus parallelism
View concurrency-parallelism.md
@abstractmachines
abstractmachines / python-vscode.md
Created May 6, 2021
Python VSCode with black and flake8
View python-vscode.md

Python VSCode settings.json w black and flake8

{
    "editor.formatOnSave": true,
    "python.formatting.provider": "black",
    "files.insertFinalNewline": true,
    "python.testing.pytestEnabled": true,
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,
@abstractmachines
abstractmachines / tmux.conf
Created May 2, 2021
tmux.conf inspired by spicycode
View tmux.conf
# Define default shell
set -g default-command /bin/zsh
# Use mouse
set -g mouse on
set -g default-terminal screen-256color
# WIP. See inspiration at: https://gist.github.com/spicycode/1229612
@abstractmachines
abstractmachines / custom-types-ts.md
Last active Jan 10, 2021
Custom TS types for Webpack + React ES6-Style Imports
View custom-types-ts.md

Custom Typescript Types Recipes for React + Webpack ES6 style imports

use case: CSS files in /src/styles dir, and SVG and PNG files in /assets/images dir

  • custom.d.ts file in dir of svg, png assets:
declare module "*.svg" {
    const content: any;
    export default content;
}
@abstractmachines
abstractmachines / webpack-4-env-variables.md
Last active Jan 10, 2021
Webpack 4 environment variables
View webpack-4-env-variables.md

Making local dev servers w Webpack 4

To use an environment variable in webpack, set module.exports to a function which returns the config object.

Only a function can take in env and argv as args, and you'll need those.

Then use defineWebpackPlugin to set environment variables.

Remember that Webpack 4 is "no config"; just set mode when you startup webpack dev-versus-prod in your package.json.

@abstractmachines
abstractmachines / redux-devtools-ts.md
Last active Jan 9, 2021
Redux Devtools Recipes: composeEnhancers, saga middleware, and TypeScript
View redux-devtools-ts.md

Redux Devtools Recipes

With composeEnhancers, Router:

const reduxDevToolsCompose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
	trace: true,
	traceLimit: 25,
});

const composeEnhancers = reduxDevToolsCompose || compose;
@abstractmachines
abstractmachines / kyle-after-asm.md
Last active Oct 24, 2020
Kyle after assembly mentoring
View kyle-after-asm.md

TODO List for Kyle - Mentoring

"Finish out" the assembly courses

  1. Take your assembly courses and convert your notes into markdown in Github gists.
  2. Pin those gists to your Github profile.

Complete 2 C++ assignments

  1. Assignment 1: Create a class with 2-3 member functions and initialize an instance of the class in main()
  2. Assignment 2: Operator overloading (look at my github for an example!)
View binary-tutorial.md

WIP. This is a tutorial I'm writing which is in progress :) - Amanda

Intro to binary (and some computer architecture)

Intended audience(s) include:

  • Very early career engineers who don't have a 'math background' (yet!)
  • Junior developers and interns who want to "understand" rather than just "complete tutorials"
  • Web developers who didn't take CS courses, but still want to understand "how things work" "under the hood"
@abstractmachines
abstractmachines / the-base-is-the-place-understanding-radix.md
Last active Jun 17, 2020
The Base Is The Place: A tutorial on radix for students of systems engineering
View the-base-is-the-place-understanding-radix.md

WIP

The Base Is The Place: Understanding Radix

How to understand radix: A tutorial for students of systems engineering

Radix : Number of unique digits that exists in a system.

Binary "base 2" : the number 2 is 0010

Note the binary number 0010. Binary is read RTL or right-to-left.