Skip to content

Instantly share code, notes, and snippets.

@MitalAshok
MitalAshok / check_hash.py
Created December 19, 2018 12:45
Prints the hash of a file using various hashing or checksum algorithms (Including CRC-32)
#!/usr/bin/env python3
"""A simple command line utility that takes a file and prints it's
hash given a hashlib algorithm. Also supports CRC-32 and Adler-32.
Examples:
$ python3 check_hash.py -a [ALGORITHM] [FILE]
Prints hash of file (e.g. "0123456789ABCDEF")
@MitalAshok
MitalAshok / sudo.py
Created December 13, 2018 13:35
Fake sudo command
#!/usr/bin/env python3
"""
Running this program will emulate the basic `sudo` command.
Set an alias or symlink and make sure that this is before /usr/bin/sudo in
the path called "sudo".
`sudo [command] [args]` should have the similar output (Though there might
be more of a pause) as the system sudo. Other sudo syntax is not supported yet.
Shows people that leaving their computer open is a huge risk. Never type your
password into something you don't trust.
@MitalAshok
MitalAshok / GeoGuessrTweaks.user.js
Created September 18, 2016 17:23
Tweaks for GeoGuessr
// ==UserScript==
// @name GeoGuessr Tweaks
// @description Changes correct location markers (The black circles with flags) to have numbers
// @author u/Artyer
// @namespace https://reddit.com/u/Artyer
// @version 1.0
// @include /^(https?)?(\:)?(\/\/)?([^\/]*\.)?geoguessr\.com($|\/.*)/
// @grant none
// ==/UserScript==