Skip to content

Instantly share code, notes, and snippets.

@JesseObrien
JesseObrien / .mutagen.toml
Created Jun 11, 2019
Mutagen global ignore/config
View .mutagen.toml
[ignore]
default = [
# System files
".DS_Store",
"._*",
# Vim files
"*~",
"*.sw[a-p]",
View docker-sync.yml
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 Feb 23, 2019
Windows subsystem for linux resources and commands
@JesseObrien
JesseObrien / Dockerfile
Last active Mar 4, 2021
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.
View Dockerfile
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 Jan 4, 2019 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# 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 Mar 23, 2017
RIP Serverside Templates
View rip.md

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 Aug 2, 2016
Example quick start for react/webpack.
View .eslintrc
{
"plugins": [
"react"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"ecmaVersion": 6,
View multiple_ssh_setting.md

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 "your_email@youremail.com"
@JesseObrien
JesseObrien / .vimrc
Created Jan 20, 2015
vim relative numbers
View .vimrc
" Switch between relative and no relative number in command/insert
au FocusLost * :set norelativenumber
au FocusGained * :set relativenumber
autocmd InsertEnter * :set norelativenumber
View request.md

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