Skip to content

Instantly share code, notes, and snippets.

View git-zombie's full-sized avatar
🎯
Focusing

George Parker git-zombie

🎯
Focusing
View GitHub Profile
@git-zombie
git-zombie / killer.py
Created June 25, 2021 02:04
Windows Killer - Python 3
#!/usr/bin/env python3.9
import sys, subprocess
def kill(process):
from subprocess import check_output, Popen
#print(sys.version)
#Check for Args
#Find PIDS for the input name
tasklist = subprocess.Popen(("tasklist"), stdout=subprocess.PIPE)
try:
output = subprocess.check_output(('findstr', '/I', process), stdin=tasklist.stdout)

Keybase proof

I hereby claim:

  • I am git-zombie on github.
  • I am trollesq (https://keybase.io/trollesq) on keybase.
  • I have a public key ASANx8KVTCv_nWRfCwNNJ4RcsZlpbiFCCAspsJBjcTj8Awo

To claim this, I am signing this object:

ssh -t pi@$ADDRESS \
"sudo apt-get -y update;
sudo apt-get -y upgrade;
sudo apt install -y openssh-server;
sudo adduser $NEWUSER;
sudo adduser $NEWUSER sudo";
ssh -t $NEWUSER@$ADDRESS \
"sudo deluser -remove-home pi"
export HN=hostname; echo "$HN" | sudo tee /etc/hostname; sudo hostname $HN
@git-zombie
git-zombie / Site Scraper
Created March 3, 2019 18:45
Sample site scraper
#!/bin/bash
hits=1
EMAIL="$email"
while :
do
Souls=`wget -qO- https://old.reddit.com/r/linux4noobs/comments/99crfq/steam_now_lets_you_play_windows_games_in_linux/ | grep "Souls" | wc -l`
if [ "$Souls" != "$hits" ]
then
@git-zombie
git-zombie / Xfix
Created March 3, 2019 16:19
Used a long time ago with some display export issue
#!/bin/bash
cp /home/pi/.Xauthority /root/.Xauthority
chmod 600 .Xauthority
DISPLAY=localhost:10.0
export DISPLAY
#!/bin/sh
if [ $# -eq 0 ]
then
echo "I can't do that, Dave!"
echo "I need a container name as an argument"
exit 1
fi
NAME=$1
docker stop $1
docker start $1
#!/bin/sh
if [ $# -eq 0 ]
then
echo "I can't do that, Dave!"
echo "I need a container name as an argument"
exit 1
fi
NAME=$1
docker stop $1
docker rm $1
#!/usr/bin/env python3
#
# This script will place movies and TV episodes on folders
# Files are not modifed or renamed only moved to folders.
#
# Usage:: ./movie&TV2folder.py /path/movies/ (Movie 1 (year) , Movie)
# Usage:: ./movie&TV2folder.py /path/tv/ ( tv folders: Tile 1, Title 2 )
# Type of files:
#
# Movies: (scans 1 folder deep - i.e. not recursive)
#!/bin/bash
EXTERNAL_IP=`wget -qO- icanhazip.com`
SAVED_IP=`cat /home/pi/docs/externalip`
EMAIL="gsp.gsp@gmail.com"
if [ ! -f /home/pi/docs/externalip ]
then
echo "0.0.0.0" >> /home/pi/docs/externalip;
fi
if [ $EXTERNAL_IP != $SAVED_IP ]
then
#!/bin/bash
EXTERNAL_IP=`wget -qO- http://www.dxracer.net/view_pre-order.html | grep -A 10 id=\"content\"`
SAVED_IP=`cat /home/pi/docs/last_page`
EMAIL="$email"
if [ ! -f /home/pi/docs/last_page ]
then
echo "aids" >> /home/pi/docs/last_page;
fi
if [ $EXTERNAL_IP != $SAVED_IP ]