Skip to content

Instantly share code, notes, and snippets.

View sajanv88's full-sized avatar
🏠
Working from home

Sajan sajanv88

🏠
Working from home
View GitHub Profile
@sajanv88
sajanv88 / AllCultures.cs
Created March 13, 2025 15:33 — forked from hikalkan/AllCultures.cs
All culture codes and corresponding Countries.
public static Dictionary<string, string> AllCultures = new Dictionary<string, string>
{
{"af", "Afrikaans"},
{"af-ZA", "Afrikaans - South Africa"},
{"ar", "Arabic"},
{"ar-AE", "Arabic - United Arab Emirates"},
{"ar-BH", "Arabic - Bahrain"},
{"ar-DZ", "Arabic - Algeria"},
{"ar-EG", "Arabic - Egypt"},
{"ar-IQ", "Arabic - Iraq"},
@sajanv88
sajanv88 / installing-postman.md
Created December 1, 2024 11:55 — forked from pmkay/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@sajanv88
sajanv88 / Dockerfile
Created August 18, 2024 08:05
Nextjs multi stage docker and pnpm
FROM node:21.7.3-alpine AS deps
RUN apk add --no-cache libc6-compat
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
@sajanv88
sajanv88 / cert_bot.sh
Created May 27, 2023 05:34
Generate ssl certificates for nginx server
# BEFORE YOU RUN THE SCRIPT MAKE SURE YOU DO THE FOLLOWING:
# check if you have site folder enabled.
# cd /etc/nginx/sites-available/$DOMAIN_NAME
# If it is enabled then open it in a editor
# sudo vim /etc/nginx/sites-available/$DOMAIN_NAME
# then look for
# server_name $DOMAIN_NAME www.$DOMAIN_NAME;
# If not then add it and save it.
@sajanv88
sajanv88 / docker_setup.sh
Created May 26, 2023 14:28
Install docker in linux server
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg -y
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
@sajanv88
sajanv88 / _responsive.scss
Last active March 9, 2022 11:51
SCSS Responsive mixin
// break points
$sm: 576px;
$md: 768px;
$lg: 992px;
$xl: 1200px;
$xxl: 1400px;
@mixin respond-to($media) {
@if $media == sm {
@media (min-width: $sm) {
@sajanv88
sajanv88 / modern+moduler.js
Created August 29, 2018 10:01
Simple Modern module pattern in JavaScript
/**
* myModule is a mini framework allows you to create your own dependency modules.
*/
const myModule = (function () {
var modules = {};
function define(name, deps, impl) {
for(var i = 0; i<deps.length; i++) {
deps[i] = modules[deps[i]];
}
modules[name] = impl.apply(impl, deps);