Skip to content

Instantly share code, notes, and snippets.

View cspence001's full-sized avatar

Ciara Spencer cspence001

  • Richmond, Virginia
View GitHub Profile
@cspence001
cspence001 / bpcupdate.py
Last active September 5, 2024 19:08
Updates the BPC Chrome extension (installed via "Load Unpacked" in Developer Mode) after verifying the SHA-256 hash of the extension’s ZIP file. On match, the script extracts and updates the extension.
#!/usr/bin/env python3
# Verifies the SHA-256 hash of a downloaded file from (https://gitflic.ru/project/magnolia1234/bpc_uploads) against the hash in [release-hashes.txt](https://github.com/bpc-clone/bypass-paywalls-chrome-clean/blob/master/release-hashes.txt).
# 1. Downloads the hash file from the [HASH_URL] and extracts the expected hash for the correspondent [FILENAME].
# 2. Downloads the zip-file [FILENAME] from [DOWNLOAD_URL] and calculates its SHA-256 hash.
# 3. Compares the calculated hash with the expected hash.
# 4. On match, prompts the user to move the file to a permanent location [DOWNLOAD_DIR].
# 5. Moves and extracts the file if confirmed; otherwise, deletes the temporary file.
# Note: Before running script, replace [DOWNLOAD_DIR] with permanent location on your computer that you use for your extension, excluding the extracted folder name [EXTRACT_DIR_NAME].
import requests
@cspence001
cspence001 / python_directories.md
Last active September 5, 2024 16:18
python directories, paths, versions

Python Versions and Paths

Listing Python Versions on Your System

To enumerate all Python versions installed on your system, use:

% ls -l /usr/local/bin/ | grep python
% ls -l /usr/bin/ | grep python
@cspence001
cspence001 / sublime_setup.md
Last active September 5, 2024 16:27
sublime text settings, packages, commands

SUBLIME-TEXT

Install with Brew

% brew install --cask sublime-text

Install Sublime Text settings from Backup

% cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null

Settings

@cspence001
cspence001 / Brave_Filters.md
Last active October 16, 2024 22:28
Brave Shields selected Filter Lists, Custom Filters
@cspence001
cspence001 / python_setup.md
Last active September 7, 2024 05:37
Commands and Resources for Managing Python environments, setup - (pipenv, venv, pip3, requirements on macOS)
@cspence001
cspence001 / custom_search.md
Last active September 5, 2024 19:07
duckduckgo !shebang for added privacy, cleaner search UI - set to browser homepage / new tab url in Brave
DuckDuckGo Custom Default Search

duckduckgo !shebang for added privacy, cleaner search UI

  • set to browser homepage / new tab url

Search Engine > Manage Search Engines and Site Search Add > e.g. :

Name: Custom DDG 
Shortcut: ddg
URL with %s in place of query: https://duckduckgo.com/?q=%s&t=brave&kc=-1&kav=1&k1=-1&kax=-1&kak=-1&kaq=-1&kap=-1&kao=-1&kau=-1&kz=1&kp=-2&kae=d&kac=-1`