(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
using OrangeMSE.Business; | |
using OrangeMSE.Business.Data; | |
using OrangeMSE.Business.Helpers; | |
using System; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Data.Entity.Infrastructure; | |
using System.Linq; | |
using System.Linq.Expressions; |
# Alternatively don't use slog but something else. I just like that more. | |
[aliases] | |
slog = log --pretty=format:"%C(auto,yellow)%h%C(auto)%d\\ %C(auto,reset)%s\\ \\ [%C(auto,blue)%cn%C(auto,reset),\\ %C(auto,cyan)%ar%C(auto,reset)]" | |
addprx = "!f() { b=`git symbolic-ref -q --short HEAD` && \ | |
git fetch origin pull/$1/head:pr/$1 && \ | |
git fetch -f origin pull/$1/merge:PR_MERGE_HEAD && \ | |
git rebase --onto $b PR_MERGE_HEAD^ pr/$1 && \ | |
git branch -D PR_MERGE_HEAD && \ | |
git checkout $b && echo && \ | |
git diff --stat $b..pr/$1 && echo && \ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
Name | Description | Exceptions |
---|---|---|
Avoid async void | Prefer async Task methods over async void methods | Event handlers |
Async all the way | Don't mix blocking and async code | Console main method |
Configure context | Use ConfigureAwait(false) when you can |
Methods that require context |
So you’ve created a really neat console app, but it’s growing and you need a way to keep it all neatly organized and preferrably with some Good Practices.
The guys at Entity Framework have thought about this and structured their console app really neatly. Today, we’ll take the ninja app we built previously and make it all look pretty and stuff.
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Cognito Stack | |
Parameters: | |
AuthName: | |
Type: String | |
Description: Unique Auth Name for Cognito Resources | |
Resources: | |
# Creates a role that allows Cognito to send SNS messages | |
SNSRole: |
pipeline { | |
agent { | |
label 'agentId' //The id of the slave/agent where the build should be executed, if it doesn't matter use "agent any" instead. | |
} | |
triggers { | |
cron('H */8 * * *') //regular builds | |
pollSCM('* * * * *') //polling for changes, here once a minute | |
} |
FROM python:3.5.3-onbuild | |
VOLUME ["/usr/src/app/staticfiles"] | |
CMD ["gunicorn", "--access-logfile", "-", "--error-logfile", "-", "-b", "0.0.0.0:8000", "app.wsgi", "-w", "4", "--preload"] | |
EXPOSE 8000 |