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
@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"
@idolpx
idolpx / webp2gif
Last active December 16, 2023 07:36
Converts a .WEBP file to animated .GIF
#!/bin/bash
DELAY=${DELAY:-10}
LOOP=${LOOP:-0}
r=`realpath $1`
d=`dirname $r`
pushd $d > /dev/null
f=`basename $r`
n=`webpinfo -summary $f | grep frames | sed -e 's/.* \([0-9]*\)$/\1/'`
dur=`webpinfo -summary $f | grep Duration | head -1 | sed -e 's/.* \([0-9]*\)$/\1/'`
// ==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 / 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 / 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