Skip to content

Instantly share code, notes, and snippets.


Norik Davtian NorikDavtian

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 /
Created Oct 7, 2019
load variables from the .env file to the terminal environment.
# example: cd project_dir && envify
envify() {
local ENV_FILE="$(pwd)/.env"
if [ ! -z "$1" ]; then
echo "Loading ENV vars from $ENV_FILE"
echo "environment .env filename is required"
# 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 /
Created May 21, 2019
Change the file extensions in project directory from `.js` to `.mjs`
for file in **/*.js; do mv "$file" "${file%.js}.mjs"; done
NorikDavtian / NPM
Created Apr 17, 2019
Fix NPM ownership issue
View NPM
echo $USER
sudo chown -R $USER /usr/local/lib/node_modules
View Adyen 803 PaymentDetail not

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 /
Created Mar 16, 2019
Install Google fonts on Mac
curl | sh

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 :)

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
ADD . /app
ENTRYPOINT [ "node", "server.js" ]
You can’t perform that action at this time.