Skip to content

Instantly share code, notes, and snippets.

View ziazon's full-sized avatar
🚂
Chugging along

Zia Zon ziazon

🚂
Chugging along
View GitHub Profile
@ziazon
ziazon / merge.sh
Created March 24, 2022 14:48
Merge multiple repos into single monorepo maintaining git history
#!/bin/bash
set -euo pipefail
NEW_REPO_DIR=${NEW_REPO_DIR:-'new-repo'}
BASE_CODE_DIR=${BASE_CODE_DIR:-'apps'}
# expected starting structue:
# merge.sh
# repo1
# repo2
# repo3
@ziazon
ziazon / nginx.conf
Created July 20, 2021 20:05
nginx config with status.json file served at /status
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
@ziazon
ziazon / add_trigger_to_table.sql
Created August 26, 2020 18:11
an audit log for data changes - postgresql
# 'schema' aka 'public' and 'table_name' aka the table name you wish to add audit logging to
DROP TRIGGER schema_table_name_audit_logging ON schema.table_name;
CREATE TRIGGER table_name_audit_logging
AFTER INSERT OR UPDATE OR DELETE
ON schema.table_name
FOR EACH ROW
EXECUTE PROCEDURE logging.log_data_changes();
@ziazon
ziazon / history.md
Last active August 9, 2020 00:49
Yakuza Vanu/HAYABUSA/Koga/Myrks Gaming Group History

About

Koga Clan was formed by a group of players who have played together since 2003. The group has a long history of pvp focused small specialized team game play.

History

  • 2003 - Originally known as Yakuza Vanu on the Johari server in the original Planetside. Reaching a rank of 4th on the server for outfit points with the smallest outfit in the top 15 outfits with only 80 on roster (60 actual players, 30-40 on during primetime), the outfit leader (JubeiYaku) was the second Command Rank 5 on the server.
  • 2004 - The leader of Yakuza vanu and a few members left the original Planetside when the Johari merged with Markov and a few other changes came to the game that they weren't a big fan of, in conjunction with the release of Lineage 2, an FFA pvp focused MMORPG. Koga Clan was formed on Gustin in Lineage 2 where the clan recruited up to exactly 2 groups that was maintained and never having more than that. The clan was hired on a regular basis to take castles for other clans and were at war with
@ziazon
ziazon / github-npm-publish.yaml
Created January 29, 2020 05:09
Github npm package publish action
name: Build and Publish
on:
push:
branches:
- master
jobs:
github-publish:
name: Publish to Github Registry
runs-on: ubuntu-latest
steps:
@ziazon
ziazon / Dockerfile
Created January 28, 2020 01:49
my node.js Dockerfile
FROM node:lts-alpine as build
WORKDIR /app
COPY ./package-lock.json ./package.json ./
RUN npm ci
COPY . .
ENV NODE_ENV=production
RUN npm run build
FROM node:lts-alpine as serve
WORKDIR /app
@ziazon
ziazon / default.conf
Created April 22, 2019 16:20
nginx for sub domain based reverse proxying to static resources
server {
listen 80;
server_name ~^(?<subdomain>.+)\.(.*)$;
root /usr/share/nginx/html/dist;
location ~ ^.+\..+$ {
try_files $uri @assets;
}
location / {
@ziazon
ziazon / Makefile
Created April 12, 2019 11:33
Makefile for npm ui projects
.PHONY: help install lint test-unit test-e2e test-e2e-headless
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: ## Creates the config.json and install npm dependencies for the project
@echo 'installing Node dependencies'
@ziazon
ziazon / nginx.conf
Last active March 10, 2017 21:13
Secure Nginx Config
server {
listen 80;
server_name domain.com www.domain.com;
return 301 https://www.domain.com$request_uri;
}
server {
listen 443 ssl http2;
server_name www.domain.com domain.com;
@ziazon
ziazon / log.js
Created May 22, 2015 14:32
Javascript Log Function
function Log() {
var escape = "\033";
var colors = {
"yellow": escape + "[33m",
"green": escape + "[32m",
"red": escape + "[31m",
"reset": escape + "[0m"
};