Skip to content

Instantly share code, notes, and snippets.

@hotsphink
hotsphink / inject.py
Created August 28, 2020 16:10
mkgist-created gist
#!/usr/bin/python3
from base64 import b64encode
import os
import sys
s = sys.stdin.read()
print("python import base64")
print('python exec(base64.b64decode("{}"))'.format(b64encode(s.encode()).decode()))
@hotsphink
hotsphink / text.txt
Created August 28, 2020 16:10
mkgist-created gist
#!/usr/bin/python3
from base64 import b64encode
import os
import sys
s = sys.stdin.read()
print("python import base64")
print('python exec(base64.b64decode("{}"))'.format(b64encode(s.encode()).decode()))
@hotsphink
hotsphink / text.txt
Created July 29, 2020 16:33
mkgist-created gist
String stats:
- Questions:
- How much memory did we save via deduplication?
- How many strings did we save via deduplication?
- What percent of ropes end up flattened?
- How much memory does eager extensibility save?
- What percent of rope nodes are directly referenced?
- How many string compares are we doing?
- How many bytes of string compares are we doing?
- How many string hashes are we doing?
@hotsphink
hotsphink / text.txt
Created July 1, 2020 21:18
mkgist-created gist
var g1 = newGlobal({newCompartment: true});
g1.debuggeeGlobal = this;
g1.eval(`
dbg = new Debugger(debuggeeGlobal);
dbg.onExceptionUnwind = () => undefined;
`);
var g2 = newGlobal({newCompartment: true});
try {
g2.eval('h = {}; quintessence');
@hotsphink
hotsphink / nightly-builds
Created June 16, 2020 18:50
mkgist-created gist
#!/bin/bash
# Suppress build:
# % touch $srcdir/NOBUILD
# Suppress clobber:
# % touch $srcdir/NOCLOBBER
message=""
function msg () {
@hotsphink
hotsphink / crontab
Created June 16, 2020 18:49
mkgist-created gist
0 0 * * * /home/sfink/bin/nightly-builds >/home/sfink/nightly.log 2>&1
0 7 * * * env DISPLAY=:1.0 notify-send -t 86400000 "$(cd $HOME/src/mozilla && $HOME/bin/hg phquery sfink --list)"
@hotsphink
hotsphink / mach
Created June 16, 2020 18:41
mkgist-created gist
#!/bin/bash
d="$(pwd)"
while [ "$d" != / ]; do
if [ -x "$d/mach" ] && [ -f "$d/mach" ]; then break; fi
d="$(dirname "$d")"
done
if [ "$d" = / ]; then
d="$HOME/src/mozilla"
@hotsphink
hotsphink / text.txt
Created June 16, 2020 18:41
mkgist-created gist
#!/bin/bash
d="$(pwd)"
while [ "$d" != / ]; do
if [ -x "$d/mach" ] && [ -f "$d/mach" ]; then break; fi
d="$(dirname "$d")"
done
if [ "$d" = / ]; then
d="$HOME/src/mozilla"
@hotsphink
hotsphink / text.txt
Created June 16, 2020 18:32
mkgist-created gist
# `mc <suffix>`: Set MOZCONFIG to the current hg root's mozconfig.<suffix>
# file. If the file does not exist, will ask if you want to use the most
# recently edited one from a sibling directory.
#
function mc () {
if [ $# = 0 ]; then
echo "MOZCONFIG is ${MOZCONFIG:-unset}"
echo "available:"
for f in "$(hg root)/mozconfig."*; do
echo "${f#*mozconfig.}"
@hotsphink
hotsphink / text.txt
Created June 3, 2020 19:58
mkgist-created gist
% sudo podman load debian8-amd64-build < ~/Builds/SM-cgc-image.tar.zst
open /var/tmp/podman430126794/manifest.json: not a directory
Error: error pulling "debian8-amd64-build": unable to pull dir:/var/tmp/podman430126794: unable to pull image: Error determining manifest MIME type for dir:/var/tmp/podman430126794: open /var/tmp/podman430126794/manifest.json: not a directory