Skip to content

Instantly share code, notes, and snippets.

View idolpx's full-sized avatar
🏠
Working from home

Jaime Idolpx idolpx

🏠
Working from home
View GitHub Profile
// ==UserScript==
// @name Scoreholio Dashboard Scraper
// @namespace http://techknowpro.com/
// @version 0.1
// @description Scrape data to send to electronic boards via MQTT
// @author James Johnston
// @match https://app.scoreholio.com/dashboard.html?account=*
// @match https://app.scoreholio.com/dashboard-bracket.html?account=*
// @match https://app.scoreholio.com/dashboard-finals.html?account=*
// @grant none
@idolpx
idolpx / reddit.base64.endecoder.user.js
Last active March 22, 2020 23:24
Automatically base64 decode links in reddit posts
// ==UserScript==
// @namespace https://gist.github.com/idolpx
// @name Reddit Base64 EnDecoder
// @version 2.1.1
// @description Automatically base64 decode links in reddit posts
// Encode/Decode selected text you enter when making a post
// - Use CTRL + [SPACE] to toggle encode/decode of text entered
// Decode selected text in page for people who post Base64 text without the trailing '=='
// - Highlight the text in the browser and then press CTRL + [SPACE]
// @downloadURL https://openuserjs.org/install/idolpx/Reddit_Base64_EnDecoder.user.js
@idolpx
idolpx / download.py
Last active April 9, 2020 22:17 — forked from mjohnsullivan/download.py
Python HTTP download with resume and optional MD5 hash checking
import os.path
import requests
import shutil
import hashlib
import logging
def validate_file(file_path, hash):
"""
Validates a file against an MD5 hash value
#!/usr/bin/python3
# Jackett .magnet file loader for Transmission
# - Sometimes Jackett can't get a torrent file to save to the watch folder
# - and instead will save a .magnet file containing the magnet link.
# - Transmission does not recognize this file so it ignores it.
# - This script will feed it to Transmission via RPC.
# - Setup a cron job to run it every so often and you are good to go.
#
# author: Jaime Idolpx (jaime@idolpx.com)
<?php
/*
* Author:
* Robin Zon <https://github.com/ZonRobin>
*
* Credits to:
* https://github.com/cowboy/php-simple-proxy/
* https://gist.github.com/iovar
*
* Usage:
@idolpx
idolpx / igmediadeprotect.user.js
Last active January 7, 2021 08:09
Instagram Media Deprotect - Removes elements protecting images & videos from download
// ==UserScript==
// @namespace https://gist.github.com/idolpx
// @name Instagram Media Deprotect
// @version 1.0.5
// @description Removes elements protecting images & videos from download
// @downloadURL https://openuserjs.org/install/idolpx/Instagram_Media_Deprotect.user.js
// @updateURL https://openuserjs.org/meta/idolpx/Instagram_Media_Deprotect.meta.js
// @author Jaime Idolpx
// @copyright 2020, idolpx (https://openuserjs.org/users/idolpx)
// @license MIT
@idolpx
idolpx / ANSI-color-codes.h
Last active April 18, 2022 18:51 — forked from RabaDabaDoba/ANSI-color-codes.h
The entire table of ANSI color codes working in C!
/*
* This is free and unencumbered software released into the public domain.
*
* For more information, please refer to <https://unlicense.org>
*/
//Regular text
#define ANSI_BLACK "\e[0;30m"
#define ANSI_RED "\e[0;31m"
std::string byteSuffixes[9] = { "", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
std::string formatBytes(uint64_t value) {
uint8_t i = 0;
double n = 0;
char *f = NULL;
do {
i++;
n = value / std::pow(1024, ++i);
10 rem *** meatloaf icon sprite
20 rem *** -idolpx
30 rem ***
40 poke 53285,8: rem multicolor 1
50 poke 53286,6: rem multicolor 2
60 poke 53269,255 : rem set all 8 sprites visible
70 for x=12800 to 12800+383: read y: poke x,y: next x: rem sprite generation
75 x=30:y=54:poke 53264,peek(53264) and 0 : rem top left
76 rem x=56:y=54:poke 53264,peek(53264) or 255: rem top right
77 rem x=30:y=222:poke 53264,peek(53264) and 0 : rem bottom left
@idolpx
idolpx / nsw_eject
Created September 13, 2019 15:41
Nintendo Switch Safe SD CARD eject on OSX
#!/bin/sh
if [ $# -lt 1 ]
then
echo "Usage: nsw_eject /path-to-mounted-sdcard/"
exit 1
fi
# Change attributes so files show up on switch
sudo chflags -R arch "$1/!install"