Skip to content

Instantly share code, notes, and snippets.

View Pal-Sandeep's full-sized avatar
⛰️
Contributing

Sandeep Pal Pal-Sandeep

⛰️
Contributing
View GitHub Profile
@Pal-Sandeep
Pal-Sandeep / index.js
Created January 5, 2024 03:48
curd with express
// const fs = require('fs');
const express = require('express');
const app = express();
const port = 3001
app.use(express.json());
const users = [{
name:"john",
kidney: [{
healthy: false
}]
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
class CustomUserManager(BaseUserManager):
def create_user(self, email, password=None):
# Your custom logic here
pass
class CustomUser(AbstractBaseUser):
email = models.EmailField(unique=True)
@Pal-Sandeep
Pal-Sandeep / models.py
Last active October 15, 2023 11:06
Django's AbstractUser
from django.contrib.auth.models import AbstractUser
class CustomUser(AbstractUser):
profile_picture = models.ImageField(upload_to='profile_pictures/')
biography = models.TextField()
TypeScript +3/ -3 █████████████████████100.0%
@Pal-Sandeep
Pal-Sandeep / install.sh
Created January 18, 2023 16:35 — forked from kodekracker/install.sh
A shell script to install all required applications and dependencies required to setup working environment after fresh install ubuntu .
#!/usr/bin/env bash
# System wide Constants
# Ubuntu Code Name Ex:- trusty for Ubuntu 14.04
CODE_NAME=$(lsb_release -cs)
## Install basic libraries required for ubuntu environment
sudo apt-get install libcurl4-openssl-dev libssl-dev -y
sudo apt-get install zsh -y
sudo apt-get install python-software-properties -y