Skip to content

Instantly share code, notes, and snippets.

@Who23
Who23 / NetworkScanner.py
Last active August 13, 2018 01:28
File scans the computer's netowork to find ip addresses connected to it
#This file scans the local network of the computer for devices and ips connected to it.
import socket
import threading
import queue
import subprocess
import sys
host = socket.gethostname()
hostIP = socket.gethostbyname(host)
@Who23
Who23 / imgRenderTerm.py
Created December 22, 2018 02:36
takes an image and renders it in a terminal when run in a terminal (256 color)
from PIL import Image
import sys
COLOR_DIFF = (0, 95, 135, 175, 215, 255)
imageNM = input("Image?: ")
SCALING = int(input("Scale? (5 - high, 20 - low): "))
im = Image.open(imageNM, "r")
width, height = im.size
pixels = list(im.getdata())
@Who23
Who23 / .zshrc
Created June 18, 2019 01:20
zshrc
export TERM="xterm-256color"
PATH=$HOME/.python-color:$PATH
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin/:$PATH"
PATH=$PATH:$HOME/.npm-global/bin
export PATH
eval "$(rbenv init -)"
export EDITOR=code
# A calculator based on the Shunting-Yard algorithm
# https://en.wikipedia.org/wiki/Shunting-yard_algorithm
# https://en.wikipedia.org/wiki/Reverse_Polish_notation
OP_PRECEDENCE = {"(": 1,
")": 1,
"+": 2,
"-": 2,
"*": 3,
"/": 3,
@Who23
Who23 / spa
Last active March 1, 2024 02:39
spa: a cli controller for spotify on macos
# moved to https://github.com/who23/spa
@Who23
Who23 / statify
Last active November 25, 2022 00:40
statify: a status script for spotify showing art and track info in the terminal
#!/bin/bash
# Who23 Github
# A script to display current spotify track info in a small terminal window
# this includes art, track name, and artist. All art/text centered
# BUILT TO WORK WITH MACOS, iTERM, & SPA (https://gist.github.com/Who23/8ff45f0f2c2c3ae8a95582178a5c92ec)
# for linux:
# iTerm is needed for the image display protocol, can work with another terminal if you change the image protocol to one
# supported by that terminal