(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.
| # This Dockerfile uses multi-stage builds: https://docs.docker.com/engine/userguide/eng-image/multistage-build/ | |
| # The builder image has all the dependencies necessary to assemble the website. | |
| FROM node:8-alpine as builder | |
| # The COPY operation looks to see if any of the source files changed since the last time the container was built. | |
| # If not changed, it uses the cached copy of this operation. If it is changed, it performs the copy and all | |
| # following steps for the builder, and for the COPY operation in the nginx image below. | |
| COPY ./package.json ./package-lock.json /code/frontend/ | |
| WORKDIR /code/frontend | |
| RUN npm install |
| /* On OSX, place this at ~/Library/Application Support/Flowdock/userstyle.css */ | |
| /* Override default flow colors with P2 branding colors */ | |
| .flow-tab:nth-child(5n+1) .tab-avatar { | |
| background: #fe7900 !important; | |
| } | |
| .flow-tab:nth-child(5n+2) .tab-avatar { | |
| background: #febd3b !important; | |
| } | |
| .flow-tab:nth-child(5n+3) .tab-avatar { |
| git branch --merged | grep -v "\*" | grep -v master | grep -v develop | grep -v release | xargs -n 1 git branch -d |
| #!/bin/bash | |
| # Check if command was ran as root. | |
| if [[ $(id -u) -eq 0 ]]; then | |
| echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
| echo "When a service requires root access, you will be prompted for a password as needed." | |
| exit 1 | |
| fi | |
| # Usage |
| <?php | |
| // Usually, you'll want to run this inside an update hook. | |
| $field = FieldStorageConfig::loadByName($entity_type, $field_name); | |
| $field->delete(); | |
| field_purge_field($field); // This part also happens automatically when cron runs. |
| #!/usr/bin/env bash | |
| # Authorize to GitHub to get the latest release tar.gz | |
| # Requires: oauth token, https://help.github.com/articles/creating-an-access-token-for-command-line-use/ | |
| # Requires: jq package to parse json | |
| # Your oauth token goes here, see link above | |
| OAUTH_TOKEN="34k234lk234lk2j3lk4j2l3k4j2kj3lk" | |
| # Repo owner (user id) | |
| OWNER="your-user-name" |
| # 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 |
(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.
| $ git branch -r --merged | | |
| grep origin | | |
| grep -v '>' | | |
| grep -v master | | |
| xargs -L1 | | |
| awk '{split($0,a,"/"); print a[2]}' | | |
| xargs git push origin --delete |