Skip to content

Instantly share code, notes, and snippets.

View meetmangukiya's full-sized avatar
🛠️
Ξ

Meet Mangukiya meetmangukiya

🛠️
Ξ
View GitHub Profile

I get a lot of questions from relatives, friends, family regarding asking to guide them, their children on how to go forward with a career in software development. This is my attempt at sharing what I did that they could use as reference or to take inspiration from.

Getting Started -- beginnning programming, open source and GSoC

I started my B.Tech. in IT in 2016 at a tier-3(not IIT, NIT, IIIT, etc.) college and with that I had always had the clarity that I am on my own and I need to figure my own way out and not rely much on the college or anyone to guide me through it. Prior to 2016 I had only done some basic level C/C++ coding in my Computer Science vocational course in 11th and 12th.

@meetmangukiya
meetmangukiya / u256_fromstr_radix_10.rs
Created June 25, 2022 13:12
U256 decimal string ser/de
pub mod u256_fromstr_radix_10 {
use super::*;
pub fn deserialize<'de, D>(deserializer: D) -> Result<U256, D::Error>
where
D: Deserializer<'de>,
{
struct Helper;
impl<'de> Visitor<'de> for Helper {
@meetmangukiya
meetmangukiya / address.rs
Created March 3, 2022 11:01
`const` function for parsing a 20 byte string into an `Address`. Can be used to declare global variables to hold addresses.
pub const fn parse_hex_20b(input: &str) -> [u8; 20] {
let mut addr = [0; 20];
let mut i = 0usize;
let mut idx = 0usize;
let bytes = input.as_bytes();
loop {
let char1 = bytes[i];
let char2 = bytes[i + 1];
let mut buf = 0u8;
@meetmangukiya
meetmangukiya / instructions.md
Created January 4, 2022 08:22
Ubuntu full disk encryption - hetzner

Keybase proof

I hereby claim:

  • I am meetmangukiya on github.
  • I am meetmangukiya (https://keybase.io/meetmangukiya) on keybase.
  • I have a public key ASDKBruomXqUIJEXxArUJkW3qN0raWr-JPmyykdzjz35vAo

To claim this, I am signing this object:

@meetmangukiya
meetmangukiya / keybase.md
Created October 18, 2018 12:03
Keybase Verification

Keybase proof

I hereby claim:

  • I am meetmangukiya on github.
  • I am meetmangukiya (https://keybase.io/meetmangukiya) on keybase.
  • I have a public key ASB_E-osSrTS94mW5mX_5DGF02vf4nIF-m3krJ2LZ8RHPwo

To claim this, I am signing this object:

@meetmangukiya
meetmangukiya / downloader.py
Created June 4, 2018 07:35
Download youtube videos as mp3 from a given playlist
import sys
import youtube_dl
opts = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
@meetmangukiya
meetmangukiya / binary.c
Last active February 17, 2018 17:20
Booths algorithm implementation in C, for results of maximum 63 bits, since 64th bit is the sign bit.
#include "binary.h"
#include <stdio.h>
#include <math.h>
#define MAX_BIN_LEN 64
/*
* Takes two binary numbers, adds them and stores the result in res.
*/
void add_binary(struct binary* num1, struct binary* num2, struct binary* res)
{
@meetmangukiya
meetmangukiya / webservices.raml.yaml
Created June 17, 2017 23:11
coala webservices raml
#%RAML 1.0
title: coala webservices
version: v1
protocols: [ HTTP, HTTPS ]
baseUri: http://webservices.coala.io
mediaType: application/json
types:
Bear:
@meetmangukiya
meetmangukiya / fn-ls.py
Created February 24, 2017 18:21
List functions and methods of classes in a python file
import ast
import sys
import os
with open(os.path.abspath(sys.argv[-1])) as f:
fc = f.read()
for i in filter(lambda x: isinstance(x, ast.FunctionDef), ast.parse(fc).body):
print(i.name)