Skip to content

Instantly share code, notes, and snippets.

View souravrax's full-sized avatar
:octocat:

Sourav Rakshit souravrax

:octocat:
View GitHub Profile
####### ####### ## ## ####### ####### ## ##
## ## ## ## ## ## ## ## ## ## ##
####### ## ## ## ## ####### ####### ## ##
## ## ## ## ## ## ## ## ## ## ##
####### ####### ####### ## ## ## ## ###
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <conio.h>
#include <time.h>
#include <ctype.h>
#include <time.h>
#include <windows.h>
#include <process.h>
#include <stdio.h>
int main(void) {
// Red text and blue background
puts("\x1b[31m\x1b[44mHello, World"); // Reset colors to defaults
printf("\x1b[0m");
}
set nocompatible "be iMproved, required
set exrc
set encoding=UTF-8
set rtp+=$HOME/.vim/bundle/Vundle.vim
call vundle#begin('$HOME/.vim/bundle/')
" ==== PLUGINS ====
1. Make a directory for the django project
2. Install 'pipenv' in the system environment if not already
3. Create a virtual environment by running 'pipenv shell' (the location of the venv defaults to '~/user/.virtualenv/', to make it live inside the current directory, make an empty folder named '.venv', pipenv automatically detects that folder and creates the virtual environment inside that folder)
4. Now install django by running 'pipenv install django' (installs the latest version)
5. Start the project by running 'django-admin startproject $NAME_OF_THE_PROJECT'
6. To start the live server cd into the project and run 'python manage.py runserver port(optional)'
7. To make a new app inside that project run 'python manage.py startapp $NAME_OF_THE_APP'
@souravrax
souravrax / Sudoku Solver
Created August 22, 2020 04:22
This is a 9x9 Sudoku Solver using Backtracking
const int N = 9;
class Solution {
bool canPlace(vector<vector<char>>& board, int i, int j, char x) {
// row check
for(int c = 0; c<9; c++) {
if(board[i][c] == x) {
return false;
}
@souravrax
souravrax / mongodb_cheat_sheet.md
Created November 9, 2020 11:49 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

Bit Manipulation Cheatsheet (C++)

Operators

Bitwise And --> &

Bitwise Or --> |

Bitwise xor --> ^

current_date = %A_DD%
Run, msedge https://adventofcode.com/2022/day/%current_date%/input
Run, cmd.exe,,,myCMD
WinWaitActive, ahk_pid %myCMD%
Send cd %HOME%/cp/aoc/2022 && mkdir day%current_date% && cd day%current_date%
Send {Enter}
Send touch input.txt sample.txt && code .
Send {Enter}