Skip to content

Instantly share code, notes, and snippets.

View Itsindigo's full-sized avatar
🐐
hummus is life

Matthew Bridges Itsindigo

🐐
hummus is life
View GitHub Profile
@Itsindigo
Itsindigo / .bash
Created November 10, 2022 08:48
RemindMe Github Alias
# https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
alias remindMe="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"
@Itsindigo
Itsindigo / example.js
Last active February 22, 2022 16:40
How to partially mock a module with jest
import { functionWithDependencyThatNeedsMocking } from './service';
jest.mock('./service', () => {
...jest.requireActual('./service');
dependencyThatNeedsMocking: jest.fn()
})
it('should mock the call', () => {
const mySpy = jest.spyOn('./service', 'dependencyThatNeedsMocking')
@Itsindigo
Itsindigo / docker-compose.yml
Created February 18, 2021 14:34
MySQL / Postgres Docker Container Init DBs Example
version: "3"
services:
a-postgres-container:
image: postgres:12
ports:
- ${DB_PORT_SOME_EXTERNAL_BIND:-5432}:5432
environment:
- POSTGRES_HOST=postgres
- POSTGRES_USER=my_user
@Itsindigo
Itsindigo / keybindings.json
Last active February 3, 2021 11:05
VS Code Keybindings
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "shift+alt+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "-editor.action.moveLinesDownAction",
import logging
import tracemalloc
tracemalloc.start(10)
logger = logging.getLogger(__name__)
class MemoryTracer:
def __init__(self):
@Itsindigo
Itsindigo / config.yml
Last active April 26, 2018 19:09
Circle CI Boiler Plate
version: 2.0
jobs:
venv:
docker:
- image: eatsindigo/phoebus-online-build
steps:
- add_ssh_keys
- checkout
- attach_workspace:
at: .
@Itsindigo
Itsindigo / Dockerfile
Last active May 1, 2018 20:45
Selenium Dockerfile
# THIS IS OUR LINUX VERSION
FROM alpine:edge
# A SPECIFIC VERSION OF FIREFOX WE NEEDED
ENV FIREFOX_VERSION 58.0.1-r2
# A PRE DOWNLOADED GECKODRIVER BINARY THAT WE STORE IN PROJECT
COPY geckodriver /usr/local/bin/