You can use the scripts/provision.sh script provided to deploy the entire demo:
./provision.sh --help
./provision.sh deploy
./provision.sh delete
| # Git branch in prompt. | |
| parse_git_branch() { | |
| git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
| } | |
| parse_git_dirty() { | |
| [[ -z $(git status --porcelain 2>/dev/null) ]] || echo "*" | |
| } | |
| git_prompt() { | |
| # First, get the branch name... | |
| local branch="$(parse_git_branch)" |
| /* | |
| * This is helpful when you want a function to execute after an event happens but if that event happens very rapidly | |
| * you can delay the execution and improve the performance of your application by executing the function only | |
| * when the events stop happening. | |
| * | |
| * For e.g. | |
| * Imagine you have to implement a search box which calls the API whenever the user types something into it. | |
| */ | |
| // throttle function |
| // 1. Even or odd | |
| function isEven(value){ | |
| if (value % 2 == 0){ | |
| return true; | |
| } | |
| else | |
| return false; | |
| } |
git fetch upstream
git reset --hard upstream/master
git push origin master -f| #!/bin/bash | |
| DARKGRAY='\033[1;30m' | |
| RED='\033[0;31m' | |
| LIGHTRED='\033[1;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| BLUE='\033[0;34m' | |
| PURPLE='\033[0;35m' | |
| LIGHTPURPLE='\033[1;35m' |
I have a fork (origin) from a project (upstream) on github. Now the upstream project has added a new branch, I want to import into my fork. How do I do that?
I tried checking out the remote and creating a branch on top of that, but that configures the branch the way that git push is trying to push to the upstream:
git checkout upstream/branch
git checkout -b branch| ========================================== | |
| BASH SCRIPTING ========================================== | |
| ========================================== TEST COMMAND | |
| ========================================== | |
| Invoke: bash [options] file | |
| Shebang: #!/usr/bin/env bash Test: test expression | |
| In script: [ expression ] | |
| ========================================== Alternate: [[ espression ]] | |
| LOOP Does not split string words | |
| ========================================== Does not expand pathglobs* |
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/ is intended for code that can run as-issrc/ is intended for code that needs to be manipulated before it can be used