Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Sephton gingerbeardman

View GitHub Profile
@larsaugustin
larsaugustin / RetroDock.swift
Created May 26, 2021
A macOS dock replacement with a modernized version of the design used before Yosemite
View RetroDock.swift
import SwiftUI
// MARK: - Constants
// Items in the dock: Add any application you’d like to see in here
let items =
[
"file:///Applications/Xcode.app",
"file:///Applications/Safari.app",
"file:///System/Applications/Messages.app",
@dardo82
dardo82 / mac-askpass.sh
Last active May 21, 2021
OSX sudo helper
View mac-askpass.sh
#!/bin/sh
BIN="/usr/local/bin/askpass"; touch $BIN; chmod 755 $BIN
security add-generic-password -a $USER -s login -T "" -w
echo "#!/bin/sh\\nsecurity find-generic-password -a $USER -s login -w" > $BIN
echo "\\n# Set sudo helper.\\nexport SUDO_ASKPASS=$BIN" >> ~/.${SHELL##/*/}rc
@infval
infval / emuparadise.download.user.js
Last active Oct 8, 2021
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
View emuparadise.download.user.js
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.3
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// https://www.reddit.com/r/Piracy/comments/968sm6/a_script_for_easy_downloading_of_emuparadise_roms/
@chriskrycho
chriskrycho / github-typography.css
Created Jan 30, 2018
Better typography on GitHub
View github-typography.css
.markdown-body {
font-family: Avenir Next
}
pre,
code,
tt,
kbd:not(.badmono),
pre,
samp,
.blob-code,
@anpage
anpage / mmlc_extract.py
Last active Sep 4, 2021
Mega Man Legacy Collection ROM Extractor
View mmlc_extract.py
#!/usr/bin/env python
# Program for extracting the NES roms of each game in the Mega Man Legacy
# Collection for PC
# iNES Headers for Mega Man 1-6
HEADERS = [b'\x4E\x45\x53\x1A\x08\x00\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00',
b'\x4E\x45\x53\x1A\x10\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00',
b'\x4E\x45\x53\x1A\x10\x10\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00',
b'\x4E\x45\x53\x1A\x20\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00',
@pudquick
pudquick / lowrez.py
Created Nov 8, 2016
Enable the "Open in Low Resolution" setting for an arbitrary application in macOS
View lowrez.py
#!/usr/bin/python
# Some notes about using this script:
# - Configure the application path and bundle id below
# - This script needs to be run as the user you need to set the checkmark for
# - The setting will not take effect until they log out and log back in at least once
import os.path
from Foundation import NSHomeDirectory, CFPreferencesCopyMultiple, CFPreferencesSetMultiple, kCFPreferencesAnyUser, kCFPreferencesCurrentHost, NSMutableDictionary, NSURL, NSURLBookmarkCreationMinimalBookmark, NSMutableArray
@wavezhang
wavezhang / java_download.sh
Last active Oct 21, 2021
download java from oracle without login
View java_download.sh
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@rougier
rougier / progress_bar.py
Created Jan 25, 2016
A progress bar using unicode character for smoother display
View progress_bar.py
# -----------------------------------------------------------------------------
# Copyright (c) 2016, Nicolas P. Rougier
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
import sys, math
def progress(value, length=40, title = " ", vmin=0.0, vmax=1.0):
"""
Text progress bar
@devster
devster / file.io.sh
Last active Dec 6, 2020
Simple cli tool to use file.io https://www.file.io/#one Install: curl https://gist.githubusercontent.com/devster/e6a591879fd9c68b86c9/raw/87b826fdf20d1669fd99cbf5aa1f105e8a72a3a1/file.io.sh | sudo tee /usr/local/bin/file.io && sudo chmod +x /usr/local/bin/file.io
View file.io.sh
#!/bin/sh
URL="https://file.io"
DEFAULT_EXPIRE="14d" # Default to 14 days
if [ $# -eq 0 ]; then
echo "Usage: file.io FILE [EXPIRE]"
echo " Example: file.io path/to/my/file 1w"
echo " This example upload your file for 1 download and expires until 7 days if not downloaded."
echo "\nSee documentation at https://www.file.io/#one"
View gist:e8f189af4c8ab7743001
-- GEODEZIK
-- BY ALICEFFEKT
frame = 0
function _update()
frame += 1
-- loop at f127