Skip to content

Instantly share code, notes, and snippets.

View Oxyrus's full-sized avatar
🥟

Andrés Pérez Oxyrus

🥟
View GitHub Profile
@Oxyrus
Oxyrus / tmux_cheatsheet.markdown
Last active November 6, 2017 02:20 — forked from henrik/tmux_cheatsheet.markdown
tmux cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@Oxyrus
Oxyrus / git-workflow.md
Created December 4, 2017 02:23 — forked from forest/git-workflow.md
Git Feature Branch Workflow

We subscribe to the Git Featrue Branch workflow, briefly described in that link.

In practice, it works as follows:

FEATURE DEVELOPMENT

Steps to Follow:

  1. Start with an updated local development branch -- by checking out the dev branch and pulling changes:
    git checkout development
    git pull origin development
go: extracting google.golang.org/grpc v1.13.0
-> unzip C:\Users\USUARIO\go\src\mod\cache\download\google.golang.org\grpc\@v\v1.13.0.zip: invalid file name google.golang.org/grpc@v1.13.0/.github/ISSUE_TEMPLATE
go: extracting github.com/kelseyhightower/envconfig v1.3.0
-> unzip C:\Users\USUARIO\go\src\mod\cache\download\github.com\kelseyhightower\envconfig\@v\v1.3.0.zip: invalid file name github.com/kelseyhightower/envconfig@v1.3.0/.travis.yml
go: extracting github.com/golang/protobuf v1.1.0
-> unzip C:\Users\USUARIO\go\src\mod\cache\download\github.com\golang\protobuf\@v\v1.1.0.zip: invalid file name github.com/golang/protobuf@v1.1.0/.gitignore
go: downloading github.com/vektah/gqlgen v0.0.0-20180710015341-ac9e5a66f879
-> unzip C:\Users\USUARIO\go\src\mod\cache\download\github.com\vektah\gqlgen\@v\v0.0.0-20180710015341-ac9e5a66f879.zip: invalid file name github.com/vektah/gqlgen@v0.0.0-20180710015341-ac9e5a66f879/.circleci/config.yml
go: extracting github.com/tinrab/retry v1.0.0
-> unzip C:\Users\USUARIO\go\sr

How to have dependency injection and parameters at the same time?

Recently I needed to have a custom authorization attribute to use in my .NET API, where I needed to have some dependency injected services but also pass in an argument to the attribute. I hope this can help you:

enum Feature
{
    Articles,
    Comments
}