Skip to content

Instantly share code, notes, and snippets.

View Leovaldez42's full-sized avatar
:octocat:
Enjoying open source

Gaurav Sharma Leovaldez42

:octocat:
Enjoying open source
View GitHub Profile
@Leovaldez42
Leovaldez42 / Dijkstra’s.cpp
Created November 18, 2020 12:59
The Dijkstra’s shortest path algorithm
#include <limits.h>
#include <stdio.h>
#define V 6
int minDistance(int dist[], bool sptSet[])
{
int min = INT_MAX, min_index;
for (int v = 0; v < V; v++)
@Leovaldez42
Leovaldez42 / crc.m
Last active December 11, 2020 17:51
clc;
msg=input('Input Message sequence :'); %msg=[1 0 0 1 0 0];
poly=input('Input Generator Polynomial :'); %poly=[1 1 0 1];
[M,N] = size(poly);
mseg = [msg zeros(1,N-1)];
[q,r] = deconv(mseg, poly);
r=abs(r);
for i=1:length(r)
def xor(a, b):
result = []
for i in range(1, len(b)):
if a[i] == b[i]: result.append('0')
else: result.append('1')
return ''.join(result)
def mod2div(divident, divisor):
clc;
msg = [];stuff = [];
n = input("Enter length of message ");
disp("Enter the message bits: ");
i = 1;j=1;count = 0;
while i<= n
msg(i)=input('');

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

Steps for Crytography

For Hex editor sudo apt-get install bless

Task 1 Encryption using different ciphers and modes

Create a file using vi msg.txt and save the file after writing some contents.

# gets all developer tools
xcode-select --install
# homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# Download font - Cascadia Code
# Casks
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@Leovaldez42
Leovaldez42 / vscode-extensions.txt
Created January 29, 2022 08:10
List of vscode extensions
code --install-extension aaron-bond.better-comments
code --install-extension abusaidm.html-snippets
code --install-extension dbaeumer.vscode-eslint
code --install-extension dsznajder.es7-react-js-snippets
code --install-extension ecmel.vscode-html-css
code --install-extension enkia.tokyo-night
code --install-extension formulahendry.auto-rename-tag
code --install-extension hollowtree.vue-snippets
code --install-extension KnisterPeter.vscode-github
code --install-extension ms-vscode.cpptools
#!/bin/bash
# Rick Astley in your Terminal.
# By Serene Han and Justine Tunney <3
version='1.1'
rick='http://keroserene.net/lol'
video="$rick/astley80.full.bz2"
# TODO: I'll let someone with mac or windows machine send a pull request
# to get gsm going again :)
audio_gsm="$rick/roll.gsm"
audio_raw="$rick/roll.s16"