Skip to content

Instantly share code, notes, and snippets.

View Tasty213's full-sized avatar

George Sykes Tasty213

View GitHub Profile
@Tasty213
Tasty213 / LICENSE.md
Created March 5, 2023 11:35
Chunks a large PDF file into multiple chunks of a defined number of pages. For instance turning a 6,000 page PDF into 12 500 page PDFs which can be more easily opened and printed.

Copyright (c) 2023 George Sykes, Leeds Liberal Democrats

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@Tasty213
Tasty213 / UniversityOfLeedsTimetableToICS.py
Created November 30, 2020 20:05
This program will take a webpage generated by the University of Leeds Student Services timetabling system in grid view and convert it into a .ics calendar. The calendar will NOT automatically update, it is advised you keep it on a seperate calendar and update whenever a major change occurs to your timetable.
try:
from bs4 import BeautifulSoup
import pandas as pd
import requests
from datetime import datetime as dt
from ics import Calendar, Event
except ModuleNotFoundError:
print('ERROR: Requirements not satifisfied please run:')
print('pip install BeautifulSoup4 pandas requests datetime ics')
exit()
@Tasty213
Tasty213 / download.x
Created December 30, 2018 22:45
Scripts to sync a remote folder with the current over ftp scripts run using lftp
# This script will download the copy currently hosted at /var/www/example to /home/user/local/folder/
open -u username,password sftp://example.com
mirror -c -e /var/www/example /home/user/local/folder/
exit
@Tasty213
Tasty213 / downloader.sh
Created December 30, 2018 22:40
Script to download a website +dependencies for when i can't be bothered to remember wget settings
echo "Enter the URL that you want to download"
read url
echo "The Site that will be downloaded is " $url
domain=`echo $url | awk -F[/:] '{print $4}'`
# uncomment to display the domain of the site being downlaoded
# echo $domain
while true; do
read -p "Do you want to download the entire site y/n? " yn # checks if the user wants to recursivly download the site
@Tasty213
Tasty213 / jiggle.sh
Created December 30, 2018 22:38
A little script i use that jiggles the mouse cursor back and forth every now and then using xdtools, better than one to edit the config file as this way i don't have to bother about stopping it in case of a power outage
#!/bin/bash
while :
do
echo "Press [CTRL+C] to stop.."
eval $(xdotool getmouselocation --shell)
echo $X $Y
X1=`expr $X + 1`
Y1=`expr $Y + 1`
# move the mouse x y
xdotool mousemove $X1 $Y1
@Tasty213
Tasty213 / openpgp.txt
Created March 5, 2018 08:21
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:0dd17d37bd81a9f80a35e0c53aadf57bac5d75ac]
@Tasty213
Tasty213 / openpgp.txt
Created January 18, 2018 20:23
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:285af56d31f0f60d960eeeba29a872e341d698ce]