Skip to content

Instantly share code, notes, and snippets.

View dn0r's full-sized avatar
🍎
Learning each day

dn0r dn0r

🍎
Learning each day
  • United States
View GitHub Profile
@dn0r
dn0r / dockutil.sh
Last active February 28, 2022 05:14
My simple personal script for managing containerd & docker service.
#!/bin/bash
# My simple bash script to turn on, off, and check state of docker and containerd
# by dn0r
containerd_state=$(systemctl is-active containerd)
docker_state=$(systemctl is-active docker)
dockon () {
sudo systemctl start containerd && sudo systemctl start docker
@dn0r
dn0r / get-crx-url.py
Last active August 24, 2019 16:34
This script adds up the chromium/chrome version and the extension ID you enter to quickly spit out the complete url to download the wanted crx file. I made this script to help me get extensions I want on ungoogled-chromium without having to constantly edit the url. Just a heads up, I am somewhat inexperienced in Python.
# The script is written like this to allow Python2.7-Python3.x to run it. Feel free to make any improvements or changes
try:
VERSION = raw_input('Enter chromium version: ')
EXT_ID = raw_input('Enter extension ID: ')
CRX_URL = "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=" + VERSION + "&x=id%3D" + EXT_ID + "%26installsource%3Dondemand%26uc"
print(CRX_URL)
except:
@dn0r
dn0r / haSha256me.py
Created June 14, 2019 07:44
Uses arguments as text input to hash them in SHA256
from sys import argv
script, string = argv
import hashlib
sha256 = hashlib.sha256()
sha256.update(string.encode('utf-8'))
output = sha256.hexdigest()
print(output)