Skip to content

Instantly share code, notes, and snippets.

View princ3raj's full-sized avatar
💭
I may be slow to respond.

Prince Raj princ3raj

💭
I may be slow to respond.
View GitHub Profile
@princ3raj
princ3raj / sql
Last active March 16, 2023 15:58
MYSQL Commands
mysql -h hist_name -u user-name -p database_name < sql_file_name # for restoring a dump
GRANT ALL PRIVILEGES ON *.* TO'user_name'@'%'; # on all database on each incoming host
@princ3raj
princ3raj / md
Created November 28, 2022 15:38
Redis Cheatsheet
### Redis CheatSheet
@princ3raj
princ3raj / md
Last active November 28, 2022 14:47
MYSQL MASTER
use parkplus_infra_sandbox_v3;
/**
SQL CookBook
*/
/**
const semSel = document.getElementById('sem-sel')
const semInput = document.getElementById('Semester')
const subSel = document.getElementById('sub-sel')
const subInput = document.getElementById('Subject')
const semm = document.getElementsByName('Semester')
const container=document.getElementById('container_edit_form')
const edit_form=document.getElementById('edit-form')
@princ3raj
princ3raj / js
Created September 27, 2022 16:35
ListenerJs
const Form = document.getElementById('sub_sel_form')
const semSel = document.getElementById('sem-sel')
const semInput = document.getElementById('Semester')
const subSel = document.getElementById('sub-sel')
const subInput = document.getElementById('Subject')
// const img = document.getElementById('img_id')
const URL=''
@princ3raj
princ3raj / py
Created August 7, 2022 05:39
PYTHON RECIPES
file is a list of dict, and you can create a new one by replacing existing dict key values
file = [ {**row, 'GPA':row['GPA'].replace('.', '$') } for row in file ]
@princ3raj
princ3raj / txt
Last active March 28, 2024 07:30
PORT Identifers
Giant Port List
Down to the UDP port list
TCP Ports
TCP 0 Reserved
TCP 1 Port Service Multiplexer
TCP 2 Management Utility
TCP 3 Compression Process
TCP 4 Unassigned
TCP 5 Remote Job Entry
@princ3raj
princ3raj / md
Last active July 27, 2022 17:06
Golang Basics -1
go run filename
go build filename
go doc strconv.Atoi
Constants: Types:
true false iota nil
Functions:
make len cap new append copy close
delete complex real imag
@princ3raj
princ3raj / basic_docker_commands.sh
Last active July 27, 2022 17:06
Docker Commands
// Build the container image
docker build -t <image_name:tag> -f <docker_file_path> .
//Verfiy the docker image
docker image ls <image_name:tag>
//Run the container
docker run -p 2323:2323 -d --name <container_name> <image_name:tag>
//verify the container is running