Skip to content

Instantly share code, notes, and snippets.

@psiborg
psiborg / BGInfo.md
Created November 1, 2024 05:19
Custom settings and scripts for Sysinternal's BGInfo

BGInfo

%USERPROFILE%\Portable\Sysinternals\BGInfo\Bginfo64.exe .\Configs\BGInfo.bgi /timer:60

BGInfo.bgi

@psiborg
psiborg / blockchain.py
Last active October 14, 2024 03:41
Basic blockchain implementation in Python
#!/usr/bin/env python3
# Setup for Raspberry Pi
# pip3 install matplotlib
# Setup for Ubuntu
# sudo apt install python3-pip3
# sudo apt install python3-matplotlib
import hashlib
@psiborg
psiborg / pi_calc.py
Last active October 14, 2024 03:56
Calculate Pi in parallel using Gauss-Legendre, Chudnovsky, and Bailey-Borwein-Plouffe (BBP) algorithms
#!/usr/bin/env python3
# ./pi_calc.py --digits 5000
import decimal
from decimal import Decimal
from math import factorial
import multiprocessing
import time
import argparse
@psiborg
psiborg / bashrc.sh
Created May 12, 2024 00:44
.bashrc from Kali Linux
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@psiborg
psiborg / macos_screenshot.md
Created January 12, 2024 19:57
Change where screenshots are saved on macOS

To change the default save location for screenshots on macOS Mojave (or later):

  • Press "Shift-Command-5" to invoke the screen capture panel
  • Click on "Options" and choose "Other Location" to choose a destination

options

@psiborg
psiborg / win10_change_user_folder_name.md
Created November 7, 2023 19:20
Change a user's folder name in Windows 10
  1. Under Windows Settings > Accounts > Family & other users > Other users
  • Click the button for "Add someone else to this PC"
  • Click the link for "I don't have this person's sign-in information"
  • Click the link for "Add a user without a Microsoft account"
  • Enter a user name, password, and security questions
  • Change the account type to "Administrator - Local account"
  • Logout and login as this new user.
  1. Open a Command Prompt using "Run as administrator" and run:
@psiborg
psiborg / software.md
Last active July 22, 2024 21:16
Software
@psiborg
psiborg / kali.md
Last active March 26, 2023 02:53
Kali Linux

Kali Linux

sudo apt update
sudo apt upgrade

Change Login Screen

import pandas as pd
import numpy as np
def get_dataset(size):
# Create Fake Dataset
df = pd.DataFrame()
df['size'] = np.random.choice(['big','medium','small'], size)
df['age'] = np.random.randint(1, 50, size)
df['team'] = np.random.choice(['red','blue','yellow','green'], size)
df['win'] = np.random.choice(['yes','no'], size)
@psiborg
psiborg / backup.sh
Last active January 19, 2023 23:54
Backup files on Mac using command line
#!/bin/bash
currdate=`date +"%Y-%m-%d %T"`
folders=("Backup Documents Sites")
echo -e "\n---[${currdate}]---\n" >> ~/backup_stdout.log
echo -e "\n---[${currdate}]---\n" >> ~/backup_stderr.log
for folder in $folders