Skip to content

Instantly share code, notes, and snippets.

Avatar
🐞
i made bugs

iczero iczero

🐞
i made bugs
View GitHub Profile
@iczero
iczero / dots3.js
Last active Apr 21, 2021
stupid unicode things
View dots3.js
// @ts-check
const { Transform } = require('stream');
const zlib = require('zlib');
// abuse varwidth fonts by encoding bytes to very thin unicode characters
// for best results run calculateWidths() with different fonts and devices
/* run this on about:blank
let root = document.createElement('div');
document.body.appendChild(root);
@iczero
iczero / mediasite-fetch.js
Last active Jan 15, 2021
Script to get information and download mediasite videos
View mediasite-fetch.js
#!/usr/bin/env node
// @ts-check
// $ npm install got path-to-regexp yargs cli-progress
// put value of MediasiteAuth cookie in a file named mediasite-auth-cookie.txt
// in the same directory as this script
const fs = require('fs');
const fsP = fs.promises;
const path = require('path');
const childProcess = require('child_process');
const got = require('got');
View rdtsc-spoof.patch
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 8fafcb2cd..2b1c7b378 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2363,7 +2363,8 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf,
CPU_BASED_MWAIT_EXITING |
CPU_BASED_MONITOR_EXITING |
CPU_BASED_INVLPG_EXITING |
- CPU_BASED_RDPMC_EXITING;
+ CPU_BASED_RDPMC_EXITING |
@iczero
iczero / mariabin-writeup.md
Last active Jun 27, 2020
maria-bin writeup
View mariabin-writeup.md
View mariabin-writeup.md
@iczero
iczero / container.c
Last active Mar 7, 2020
crappy container (works on android)
View container.c
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include <sys/syscall.h>
#include <fcntl.h>
#include <sched.h>
#include <unistd.h>
#include <stdio.h>
@iczero
iczero / circular-buffer.js
Last active Jan 2, 2020
an expanding circular buffer implementation
View circular-buffer.js
// @ts-check
// eslint-plugin-jsdoc doesn't support @template
/* eslint-disable jsdoc/no-undefined-types,jsdoc/check-tag-names */
/**
* Copy an array, the lame way
* @template T
* @param {T[]} source Source array
* @param {T[]} dest Destination array
* @param {number} srcStart Start index of source array
* @param {number} srcEnd End index of source array plus one
@iczero
iczero / autotools-build.sh
Created Apr 21, 2019
List of stuff to run to build something from source with autotools
View autotools-build.sh
libtoolize
aclocal
autoreconf --install
autoconf
automake --add-missing
@iczero
iczero / tinc-dist.sh
Last active Mar 4, 2020
Build a binary tarball of tinc
View tinc-dist.sh
#!/bin/bash
set -xe
if [[ $EUID -ne 0 ]]; then
fakeroot $0
exit $?
fi
umask 022
VERSION=$(git rev-parse --short HEAD)
libtoolize
aclocal
@iczero
iczero / build-proton.sh
Last active Dec 25, 2020
this script will probably not build proton
View build-proton.sh
# Build Proton. Hopefully.
# Note: DO NOT ACTUALLY RUN THIS SCRIPT. Copy/paste each command so if something goes wrong this thing
# doesn't murder your system by accident.
# You should probably run this in a container.
# If you decide to stop it when it is building wine32, make sure you reinstall the 64-bit versions of
# the libraries so you don't have a massive headache while trying to build 64-bit things later on.
git clone --depth 10 https://github.com/ValveSoftware/Proton ./proton --recursive --shallow-submodule
cd proton
# reset all the submodules, no clue why this is needed