Skip to content

Instantly share code, notes, and snippets.

# ZSH Theme - Preview: https://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if [[ $UID -eq 0 ]]; then
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m %{$reset_color%}'
local user_symbol='#'
else
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m %{$reset_color%}'
local user_symbol='$'
fi
@usbpc
usbpc / normalize.py
Created May 5, 2020 21:36
A Script to normalize the audio of media files while also converting them to mp3s
#!/usr/bin/python3
#Tries to convert all the files in the directory where it is executed into normalized mp3s.
#All resulting mp3s are placed in a folder called 'normalized'
import multiprocessing as mp
import subprocess
import re
import json
import os
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
addresses:
- @@IP_SUBNET@@
gateway4: @@GATEWAY@@
nameservers:
addresses: [@@DNS@@]
import requests
import sys
import time
import json
from pathlib import Path
authURL = "https://authserver.mojang.com"
realmsURL = "https://pc.realms.minecraft.net"
header = {'Content-Type':'application/json'}
credentialFile = Path("./realmCredentials.json")
@usbpc
usbpc / realmDownloader.py
Last active July 11, 2017 20:52
A "simple" python CLI application to authenticate a user and download a minecraft realm world if the user is allowed to do so. minecraft realm downloader
import requests
import sys
import time
import json
from pathlib import Path
authURL = "https://authserver.mojang.com"
realmsURL = "https://pc.realms.minecraft.net"
header = {'Content-Type': 'application/json'}
credentialFile = Path("./realmCredentials.json")
#!/usr/bin/env sh
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
cd /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/
sudo curl -L -o bin.tar.gz https://www.dropbox.com/s/1h2q39g1n89vpnk/bin.tar.gz?dl=1
sudo mv -f bin/ bin.old/
sudo tar -p -xzf bin.tar.gz
sudo rm bin.tar.gz