👊To make things easier with git
, I have created a few git aliases as well as few bash aliases.
👀Combining these two, I do power use of git commands during my daily development.
🤘Sharing here so that you can do the same!
name: "Deploy into Kubernetes" | |
description: "Deploys the service into kubernetes" | |
inputs: | |
digitalocean_token: | |
description: "Personal access token to use digitalocean CLI" | |
required: true | |
cluster_name: | |
description: "Name of the kubernetes cluster" | |
required: true |
name: deploy-to-doks | |
on: | |
push: | |
branches: | |
- master | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} |
name: provision-infra | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest |
terraform { | |
required_providers { | |
digitalocean = { | |
source = "digitalocean/digitalocean" | |
version = "~> 2.0" | |
} | |
} | |
backend "s3" { | |
endpoint = "https://sgp1.digitaloceanspaces.com" |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: api | |
labels: | |
app: api | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: |
#!/usr/bin/env bash | |
# Creates a certificate authority cert & key; this you can use as CA for your self-signed certs | |
function create_ca() { | |
openssl req -new -x509 -nodes -days "${1}" -keyout ca.key -out ca.crt | |
} | |
# Creates a private key and a respective csr | |
function create_csr() { | |
openssl req -new -newkey rsa:2048 -nodes -keyout "${1}".key -out "${1}".csr |
const ref = React.createRef(); | |
// ... | |
return ( | |
<ScrollToStick applyOn={ref} offset={60}> | |
<div className="header-wrap" ref={ref}> | |
<header> | |
<div className="logo"></div> | |
<div className="brand-title"></div> | |
</header> |
# installation step # | |
FROM node:lts-alpine3.9 AS builder | |
ENV BUILD_DIR /build | |
RUN mkdir -p $BUILD_DIR | |
WORKDIR $BUILD_DIR | |
COPY . $BUILD_DIR/ | |
RUN npm install --no-audit | |
# if you have any build step, you should include that | |
# in this stage as well. e.g. npm run build |
👊To make things easier with git
, I have created a few git aliases as well as few bash aliases.
👀Combining these two, I do power use of git commands during my daily development.
🤘Sharing here so that you can do the same!
# git shortcuts | |
alias fetch="git fetch origin" | |
alias push="git push origin" # push to branch | |
alias fpush="git push -f origin" # force-push to branch | |
alias pull="git pull --rebase origin" # always do safe pull from a remote branch to avoid any merge commits getting created | |
alias clr="git cleanup" # deletes the branches which are already merged | |
alias rrw="git pull --rebase origin" # remote rebase with | |
alias delbr="git br -D" | |
alias delall="git branch | grep -v 'master' | xargs git branch -D" # del all local branches except master | |
alias rename="git co master && git br -m ${1} ${2}" # rename branch 1 to 2 |