Skip to content

Instantly share code, notes, and snippets.

View Aikufurr's full-sized avatar
🦊
Foxos

Aikufurr Aikufurr

🦊
Foxos
View GitHub Profile
@Aikufurr
Aikufurr / Amazon-URL-Shortener.js
Created September 29, 2019 10:11
Replaces the long URL with a simpler shorter one
// ==UserScript==
// @name Amazon URL Shortener
// @namespace https://gist.github.com/Aikufurr
// @version 0.1
// @description Replaces the long URL with a simpler shorter one
// @author Aikufurr
// @match https://www.amazon.co.uk/*
// @match https://www.amazon.com/*
// @match https://www.amazon.de/*
// @match https://www.amazon.co.jp/*
@Aikufurr
Aikufurr / hegartyMaths-Firefox.js
Created November 19, 2019 16:22
Remove the firefox warning on Hegarty Maths
// ==UserScript==
// @name Firefox Still works
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Firefox Still works
// @author Aikufurr
// @match https://hegartymaths.com/*
// @grant none
// ==/UserScript==
@Aikufurr
Aikufurr / fix_half_width.user.js
Last active November 9, 2021 12:28
Removes the album cover from covering the whole screen and adds the like/dislike buttons back
// ==UserScript==
// @name Fix half width
// @namespace http://tamprmonkey.net/
// @version 1.2
// @description Removes the album cover from covering the whole screen and adds the like/dislike buttons back
// @author Aikufurr
// @match https://music.youtube.com/*
// @icon https://www.google.com/s2/favicons?domain=youtube.com
// @grant none
// ==/UserScript==
@Aikufurr
Aikufurr / hibernation.md
Created November 17, 2021 19:07
How to add hibernation to Arch Linux using a swapfile
  1. Run as root
sudo su

  1. Create swap file

Note: set count to your RAM capacity + 2, eg 8GB RAM so count=10

import subprocess
import json
import sys
output = subprocess.Popen(["curl", "-s", "-L", "http://suggestqueries.google.com/complete/search?client=firefox&q=" + sys.argv[1]], stdout=subprocess.PIPE).communicate()[0]
l = json.loads(output)[1]
for i,e in enumerate(l):
print(str(i) + ": " + e)
i = input("> ")
p = subprocess.Popen(["xsel", "-bi"], stdin=subprocess.PIPE)
p.communicate(input=l[int(i)].encode())
@Aikufurr
Aikufurr / NorthstarServerStats.py
Last active February 24, 2022 00:07
Simple Python script I hacked together to allow you so have an updating list of servers with their player count, gamemode, and map.
### Requirements
# pip install requests tabulate
### Config
# Update interval in seconds
update_interval = 14
# Terms to search for (can be list)
query = ["[UK]", "[EU/GER]"]
# Display query
display_query = True
@Aikufurr
Aikufurr / pokemon-tcg-qr-redeemer.py
Last active August 8, 2022 15:38
Hold a series of Pokémon TCG QR Cards in front of your webcam and it'll automatically redeem them for you, perfect for when you have a batch of cards to redeem.
### USAGE ###
# 0. Install the requirements: python -m pip install opencv-python pyperclip selenium
# 1. Fill out the credentials below
USERNAME = "USERNAME"
PASSWORD = "PASSWORD"
AUTO_REDEEM = True
# If Auto Redeem (True):
# 2. Run program
# 3. Hold the Online TCG Cards in front of the webcam, once the card has been registered it's code will be printed to the console
@Aikufurr
Aikufurr / eos_updater.sh
Last active May 16, 2024 19:28
EndeavourOS Repo/AUR/Flatpak Updater, recommended to run with "--paru --flatpak"
#!/bin/bash
# Package updater for EndeavourOS and Arch.
# Handles db lock file, keyrings, syncing, and optionally AUR with given AUR helper as well as Flatpak.
echo2() { echo -e "$@" >&2 ; }
echo3() { echo -e "\n${BLUE}[>>]${RESET}${BOLD} $@${RESET}" >&2 ; }
echo_err() { echo -e "\n${RED}[!!]${RESET}${BOLD} $@${RESET}" >&2 ; }
printf2() { printf "$@" >&2 ; }
WARN() { echo2 "==> $progname: warning: $1"; }