Skip to content

Instantly share code, notes, and snippets.

@JesseObrien
JesseObrien / .mutagen.toml
Created June 11, 2019 17:01
Mutagen global ignore/config
[ignore]
default = [
# System files
".DS_Store",
"._*",
# Vim files
"*~",
"*.sw[a-p]",
@JesseObrien
JesseObrien / docker-sync.yml
Created June 11, 2019 15:21
Docker sync setup
version: 2
options:
compose-file-path: 'docker-compose.yml'
compose-dev-file-path: 'docker-compose-dev.yml'
syncs:
admin-app-sync:
sync_strategy: 'native_osx'
src: './'
sync_args:
@JesseObrien
JesseObrien / wsl.md
Created February 23, 2019 15:03
Windows subsystem for linux resources and commands
@JesseObrien
JesseObrien / Dockerfile
Last active December 14, 2023 17:40
Dockerfile for asp dotnet core with timezone change, npm install, and two-stage build process. This uses the 'aspnetcore-build' container to produce the build with ALL of the SDK dependencies, and the 'aspnetcore' container to run the code itself, cutting down the production container's size.
FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN rm -rf node_modules && npm install
@JesseObrien
JesseObrien / boxstarter.ps1
Last active January 4, 2019 21:22 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@JesseObrien
JesseObrien / rip.md
Last active March 23, 2017 15:06
RIP Serverside Templates

I think I'm definitely going hard on using the word "improper" but my justification is that you're going to write "client side" code either way. It's going to exist in blade templates, or web components. Where I see the react ecosystem moving is write-once components that can then actually be used cross-platform. I just can't justify to a client (or myself) tossing HTML in blade templates and tolerating postback page load times anymore. I look at it as a sort of separation of concerns on steroids, beyond just domain design -> into the full application desgin. I like (and real-world use has proven) the idea of two very cleanly separated contexts, one where I'm writing only an API, and one where I'm only writing client-related code. I can make sure either side has only the code they need, only the tests they need, and there's no mixing of code. I don't even need a web browser for my API, and for React with jest/enzyme I barely need one for writing clients now as well.

The middle ground I'm warming up to is hav

@JesseObrien
JesseObrien / .eslintrc
Last active August 2, 2016 14:01
Example quick start for react/webpack.
{
"plugins": [
"react"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"ecmaVersion": 6,

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@JesseObrien
JesseObrien / .vimrc
Created January 20, 2015 07:49
vim relative numbers
" Switch between relative and no relative number in command/insert
au FocusLost * :set norelativenumber
au FocusGained * :set relativenumber
autocmd InsertEnter * :set norelativenumber

September 25, 2014

Request Cycle

  • HTTP Request -> Received by Controller
  • Controller -> Serializes request data into command
  • Controller -> Passes Command off to Command Bus
  • CommandBus -> Resolves Command to Handler
  • Command Handler -> Receives Request, create or retrieve/update or delete Entities, persist changes to data layer via Repositories
  • Entities -> aggregate events on domain logic around them