Skip to content

Instantly share code, notes, and snippets.

:shipit:
shipping

Norik Davtian NorikDavtian

:shipit:
shipping
Block or report user

Report or block NorikDavtian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NorikDavtian
NorikDavtian / envify.sh
Created Oct 7, 2019
load variables from the .env file to the terminal environment.
View envify.sh
# example: cd project_dir && envify .env.dev
envify() {
local ENV_FILE="$(pwd)/.env"
if [ ! -z "$1" ]; then
ENV_FILE="$(pwd)/${1}"
echo "Loading ENV vars from $ENV_FILE"
else
echo "environment .env filename is required"
fi
View ignore_idea_dir_globally.sh
# you dont have to include this in every repo when you use any of the intellij IDEs
echo ".idea" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
@NorikDavtian
NorikDavtian / js-to-mjs.sh
Created May 21, 2019
Change the file extensions in project directory from `.js` to `.mjs`
View js-to-mjs.sh
for file in **/*.js; do mv "$file" "${file%.js}.mjs"; done
@NorikDavtian
NorikDavtian / NPM EACCESS.sh
Created Apr 17, 2019
Fix NPM ownership issue
View NPM EACCESS.sh
echo $USER
sudo chown -R $USER /usr/local/lib/node_modules
View Adyen 803 PaymentDetail not found.md

This is due to Payment Detail not being available by the payment gateway for many reasons

  • Check the Adyen dashboard for the 803 transactions and prior transactions if any exist
@NorikDavtian
NorikDavtian / install-google-fonts.sh
Created Mar 16, 2019
Install Google fonts on Mac
View install-google-fonts.sh
curl https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | sh
View learn-go-lang-expedited.md

Learn Go Lang: Expedited

This is my take on learning go and experimenting with it, again.
Learning a new language is often times a lot of back and forth between I got it and hmm what's next?
It is easy to get started but what is past the hello-word.go?
Is it a web server or is it a cli tool?
This is the never ending loop of being stuck on more hello world examples and more CRUD using different frameworks that I dont intend to use.
Sometimes it is difficult to do paradigm switching, but a working playground environment will make it easy to get it going and not get stuck. I hit my own share of roadblocks trying to learn go, hopefully this list will make it easy for someone else.

Let's not get stuck and get it going :)

View cheatsheet.sh
# https://kubernetes.io/docs/reference/kubectl/cheatsheet/#zsh
source <(kubectl completion zsh) # setup autocomplete in zsh into the current shell
echo "if [ $commands[kubectl] ]; then source <(kubectl completion zsh); fi" >> ~/.zshrc # add autocomplete permanently to your zsh shell
View Dockerfile
FROM alpine
RUN apk update && apk upgrade
RUN apk add nodejs
WORKDIR /app
ADD . /app
ENTRYPOINT [ "node", "server.js" ]
You can’t perform that action at this time.