Skip to content

Instantly share code, notes, and snippets.

View meetmangukiya's full-sized avatar
🛠️
Ξ

Meet Mangukiya meetmangukiya

🛠️
Ξ
View GitHub Profile
import requests
import os
from time import sleep
url = input('Enter the url you want to track: ')
gap = int(input('Amount of time after which it should check for update(in seconds) : '))
print(
"""
To terminate the program press Cmd/Ctrl + C
"""
@meetmangukiya
meetmangukiya / syntax.md
Last active October 16, 2016 12:07
How to create check-boxes in github markdown?
- [ ] This is unchecked box
- [x] This is checked box
  • This is unchecked box.
  • This is checked box.
@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)
@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 / 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 / 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 / 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:

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 / instructions.md
Created January 4, 2022 08:22
Ubuntu full disk encryption - hetzner
@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;