Skip to content

Instantly share code, notes, and snippets.

View corwin-of-amber's full-sized avatar
💭
GAAAA!!!

Shachar Itzhaky corwin-of-amber

💭
GAAAA!!!
View GitHub Profile
# Based on:
# https://confluence.atlassian.com/bitbucket/reduce-repository-size-321848262.html
for m in "$@" ; do # jscoq/coq-pkgs/*.coq-pkg ; do
git filter-branch --index-filter "git rm --cached --ignore-unmatch $m" HEAD
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
done
# Prune all of the reflog references from now on back (unless you're explicitly only operating on one branch).
git reflog expire --expire=now --all
@corwin-of-amber
corwin-of-amber / marshal32.js
Last active March 15, 2019 15:40
Override js_of_ocaml's Marshal functionality with 32-bit truncation
/**
* This is a hack to circumvent a discrepancy arising when Coq is compiled
* as a 64-bit library and then passed through js_of_ocaml, resulting in
* 32-bit JavaScript code.
* As a whole, the Coq codebase makes little use of integer arithmetic and
* does not create huge arrays of more than 2^31-1 elements. An exception
* to this is hash values calculated for storing various Coq types in maps
* and hash tables and to speed up comparisons.
* Though the values themselves are meaningless, they are unfortunately
* stored in .vo files through use of the Marshal module, and lead to files
// ==UserScript==
// @name LeaveMeAlone
// @namespace corwin.amber
// @description Prevents the leave confirmation dialog
// @include http://*.shinezone.com/*
// @version 1
// @grant none
// ==/UserScript==
console.log("Leave me!");
#!/usr/bin/python
#
# LG Download Mode Console
#
# This tool was reverse engineered from Korean developer Only's Send_Command tool
# The code is poor quality with unfinished parts. It works, barely. If you make improvements
# please let me know.
#
# dev@jacobstoner.com
#