Skip to content

Instantly share code, notes, and snippets.


Mark Grandi mgrandi

  • Arizona, USA
View GitHub Profile
jonbarrow /
Last active April 11, 2021 04:24
Rip SMM1 course data and metadata from Nintendo's servers using NEX
Credit Jonathan Barrow 2021
This will rip courses from SMM1 using NEX to automate the process
Use at your own risk, I am not resposible for any bans
Requires Python 3 and
Licensed under GNU GPLv3
coolreader18 /
Last active May 19, 2023 08:33
CPython segfault in 5 lines of code
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
briangordon / git-review-aliases.txt
Last active September 16, 2022 17:51
Aliases for code reviewing GitHub pull requests using a GitFlow/OneFlow branching model
View git-review-aliases.txt
The code review workflow that I prefer is to check out a feature branch, then `reset --soft` to move the branch HEAD to
just before the changes. That way I still have all of the changes in my working copy, and those exact changes are staged
for commit. My IDE will highlight the changed lines right in the editor and let me click the gutter to view a quick diff.
This is incredibly useful. But problems arise when develop has been merged into a running PR, bringing along a whole bunch
of other unrelated changes that have already been reviewed. I don't want all of those other changes to be highlighted in
my IDE, but I do want them in my working copy.
leodutra /
Last active April 20, 2023 12:06
Enable long paths on Windows 10 and Git

If you run Windows 10 Home Edition you could change you Registry to enable Long Paths.

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem in regedit and then set LongPathsEnabled to 1.

If you have Windows 10 Pro or Enterprise you could also use Local Group Policies.

Go to Computer Configuration > Administrative Templates > System > Filesystem in gpedit.msc, open Enable Win32 long paths and set it to Enabled.

git config --system core.longpaths true
mikaelhg /
Last active August 17, 2020 17:47
Workaround for the trustAnchors parameter must be non-empty
# Ubuntu 18.04 and various Docker images such as openjdk:9-jdk throw exceptions when
# Java applications use SSL and HTTPS, because Java 9 changed a file format, if you
# create that file from scratch, like Debian / Ubuntu do.
# Before applying, run your application with the Java command line parameter
# java ...
# to verify that this workaround is relevant to your particular issue.
# The parameter by itself can be used as a workaround, as well.
SMSAgentSoftware / Get-WindowsVersion.ps1
Last active December 21, 2022 12:48
Finds the Windows version including Edition, Version and OS Build numbers for local or remote computers
View Get-WindowsVersion.ps1
[string[]]$ComputerName = $env:COMPUTERNAME
Faheetah / Jenkinsfile.groovy
Last active April 25, 2023 14:55
Jenkinsfile idiosynchrasies with escaping and quotes
View Jenkinsfile.groovy
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
mid-kid /
Created September 26, 2015 10:34
Unpack and repack Pokemon Super Mystery Dungeon's message.bin
from sys import argv
from struct import unpack, unpack_from, pack
from os import makedirs
from os.path import isdir
from json import dumps, loads
def unpack_wchar_str_from(bytes, pos):
string = b""
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active May 30, 2023 18:06
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
Jaza / Private-pypi-howto
Last active May 18, 2023 14:45
Guide for how to create a (minimal) private PyPI repo, just using Apache with directory autoindex, and pip with an extra index URL.