Skip to content

Instantly share code, notes, and snippets.

View NorikDavtian's full-sized avatar
🚢
Shipping

Norik Davtian NorikDavtian

🚢
Shipping
View GitHub Profile
@NorikDavtian
NorikDavtian / .gitignore
Created July 24, 2020 08:21 — forked from johnandersen777/.gitignore
Setting Up k3s for Serverless (knative) on a $5 DigitalOcean Droplet Using k3d
.terraform/
*.pem
*.tf
*.tfstate
*.yaml
*.backup
istio-*/
cert-manager-*/
*.swp
env
let obj = {
"name": "john",
"Age": "21",
"sex": "male",
"place": {"state": "ca"},
"cats": [{"name": "toby"}, {"name": "wiskers"}]
};
let capitalize = (s) => {
if (typeof s !== 'string') return '';
package main
import (
"database/sql"
"strconv"
"log"
"net/http"
"fmt"
"bytes"
"gopkg.in/gin-gonic/gin.v1"
killport(){
echo "checking PORT $1"
lsof -ti tcp:$1
lsof -ti tcp:$1 | xargs kill
}
@NorikDavtian
NorikDavtian / envify.sh
Last active September 9, 2022 23:08
load variables from the .env file to the terminal environment.
#!/bin/sh
# example: ./scripts/envify.sh .env.dev
envify() {
ENV_FILE="$(pwd)/.env"
if [ -n "$1" ]; then
echo "FILE: $1"
ENV_FILE="$(pwd)/${1}"
fi
if [ -f "$ENV_FILE" ]; then
# 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 05:09
Change the file extensions in project directory from `.js` to `.mjs`
for file in **/*.js; do mv "$file" "${file%.js}.mjs"; done
@NorikDavtian
NorikDavtian / NPM EACCESS.sh
Created April 17, 2019 22:42
Fix NPM ownership issue
echo $USER
sudo chown -R $USER /usr/local/lib/node_modules

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 March 16, 2019 01:29
Install Google fonts on Mac
curl https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | sh