Skip to content

Instantly share code, notes, and snippets.

View techiepriyansh's full-sized avatar

Priyansh Rathi techiepriyansh

  • IIT Roorkee
View GitHub Profile
@techiepriyansh
techiepriyansh / gsoc23_qemu_contributions.md
Created August 25, 2023 23:52
GSoC'23 @ QEMU Final Report
@techiepriyansh
techiepriyansh / init.vim
Created November 6, 2022 15:06
My neovim config
set number
:set autoindent
:set smarttab
:set mouse=a
call plug#begin()
Plug 'http://github.com/tpope/vim-surround' " Surrounding ysw)
Plug 'https://github.com/preservim/nerdtree' " NerdTree
Plug 'https://github.com/tpope/vim-commentary' " For Commenting gcc & gc
@techiepriyansh
techiepriyansh / gsoc22_godot_contributions.md
Last active May 6, 2023 18:52
GSoC'22 @ GodotEngine Final Project Report
@techiepriyansh
techiepriyansh / err_check.h
Last active February 2, 2022 13:09
Simple TCP Socket Server and Client in C
#ifndef INCLUDE_ERR_CHECK_H
#define INCLUDE_ERR_CHECK_H
#define ERR_CHECK(x, y) do { \
int retval = (x); \
if (retval == -1) { \
perror((y)); \
exit(1); \
} \
} while(0)
@techiepriyansh
techiepriyansh / settings.json
Last active June 7, 2023 09:27
My VSCode settings.json
{
"telemetry.telemetryLevel": "off",
"update.enableWindowsBackgroundUpdates": false,
"update.mode": "none",
"workbench.colorTheme": "Default Light+",
"workbench.activityBar.visible": false,
// "editor.lineHeight": 1,
"editor.quickSuggestions": {
"other": false,
"comments": false,

GitExercises WriteUp

This is a write-up of the GitExercises upto level "fixed-old-typo".

master

Problem Statement

The first exercise is to push a commit that is created when you run the git start command.

Just try git verify after you have initialized the exercises and be proud of passing the first one :-)

OverTheWire Bandit WriteUp

This is the write-up of the OverTheWire Bandit wargame levels 0-20.

Bandit 0

Problem statement

The goal of this level is for you to log into the game using SSH. The host to which you need to connect is bandit.labs.overthewire.org, on port 2220. The username is bandit0 and the password is bandit0. Once logged in, go to the Level 1 page to find out how to beat Level 1

import 'package:dart_midi/dart_midi.dart';
import 'dart:io';
class MidiProcessor {
final String filePath;
MidiFile parsedMidi;
MidiProcessor(this.filePath)
{
@techiepriyansh
techiepriyansh / InfiniteCalc.html
Last active April 18, 2021 10:48
InfiniteCalculator
<script>
function multiply(a, b) {
if (a == "") {
a = "0";
}
if (b == "") {
b = "0";
}
@techiepriyansh
techiepriyansh / InBuiltJavaScriptEvaluator.js
Created March 17, 2018 10:43
The simplest way to parse string algebra in javascript with 3 lines of code. This magical thing uses javascript's inbuilt ability to parse string algebra...
var makeFunctionOfX = function(src) {
return Function('x', 'return ' + src);
};
var g = makeFunctionOfX('2 * x')
var y = g(3); // y contains 6