Skip to content

Instantly share code, notes, and snippets.

View psahni's full-sized avatar

Prashant Sahni psahni

View GitHub Profile
@psahni
psahni / docker-compose-wp-mysql.yml
Created June 10, 2024 07:55
docker-compose-example-wp-mysql
version: '3'
services:
db:
container_name: wp-mysql
image: mysql:5.7
volumes:
- $PWD/data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: 12345678
@psahni
psahni / .gitlab-ci.yml
Created May 18, 2024 14:20
gitlab_cicd_example
image: node:10
stages:
- build
- test
- deploy review
- deploy staging
- deploy production
- production tests
@psahni
psahni / postgres.md
Last active April 30, 2024 07:39
all about postgres

Connect

psql -U postgres

Create Db

CREATE DATABASE my_test_db

List Db

\l

Use Db

hash=$(git log --format="%h" -n 1)
@psahni
psahni / connect_to_multiple_database.md
Created November 9, 2023 08:49
connect_to_multiple_database.md
@psahni
psahni / code_snippets_go.md
Last active November 21, 2023 12:28
code_snippets_go.go
type Employee string

const (
	Manager      Employee = "manager"
	Developer    Employee = "Developer"
	Tester       Employee = "Tester"
)
@psahni
psahni / db_design_e_commerce.js
Last active August 3, 2023 14:32
db_design_e_commerce
Designing a database schema for an online merch store involves identifying the entities and their relationships. Here's a basic schema to get you started:
Entities:
Users/Customer: Information about the store's customers.
UserID (Primary Key)
Username
Email
Password (hashed)
@psahni
psahni / sso_cookie_samesite.md
Created July 31, 2023 13:40
sso_cookie_samesite.md