Skip to content

Instantly share code, notes, and snippets.

View richinseattle's full-sized avatar

richinseattle

View GitHub Profile
@richinseattle
richinseattle / spectre.c
Last active January 10, 2018 15:38 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#ifdef _MSC_VER
#include <intrin.h> // for rdtscp and clflush
#pragma optimize("gt",on)
#else
#include <x86intrin.h> // for rdtscp and clflush
#endif
@richinseattle
richinseattle / docker-killall.sh
Last active March 10, 2018 04:23 — forked from i-e-b/killall.sh
Kill all docker containers
sudo bash
docker stop -t 0 $(docker ps -a -q)
docker rm $(docker ps -a -q)
exit
@richinseattle
richinseattle / txt2xp.py
Created May 9, 2018 07:16 — forked from mtvee/txt2xp.py
Convert plain text to XP format used by REXPaint
#
# translate a plain text file into the REXPaint file format
#
# NOTE: seems to come out rotated -90 for some reason
# writing order is off? idk
import struct
INFILE = 'plain_text.txt'
OUTFILE = 'fancy_text.xp'
@richinseattle
richinseattle / image2xp.py
Created May 9, 2018 07:17 — forked from mtvee/image2xp.py
convert an image to REXPaint xp or ascii, with optional resize
#
# translate an image file into the REXPaint file format
# or plain ascii
#
# requires: python 3+
# requires: pip install Pillow
#
# source: https://gist.github.com/mtvee/5629a2caa34dbf3ece95
# ---------------------------------------------------------------------------------
import os
@richinseattle
richinseattle / rocketguide.md
Created May 22, 2018 02:17 — forked from belst/rocketguide.md
Deploy Rocket using Letsencrypt and nginx

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@richinseattle
richinseattle / private_fork.md
Created October 10, 2018 09:09 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@richinseattle
richinseattle / ghidra_processor_docs_downloader.py
Created May 17, 2019 21:34 — forked from ckuethe/ghidra_processor_docs_downloader.py
Ghidra Processor Documentation Downloader
#!/usr/bin/env python
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
import os
import requests
import sys
docs = {
'68000': {
'M68000PRM.pdf': 'https://www.nxp.com/files-static/archives/doc/ref_manual/M68000PRM.pdf',
#!/bin/bash
objdump -d "${1}" | grep -Eo '\$0x[0-9a-f]+' | cut -c 2- | sort -u | while read const; do echo $const | python -c 'import sys, struct; sys.stdout.write("".join(struct.pack("<I" if len(l) <= 11 else "<Q", int(l,0)) for l in sys.stdin.readlines()))' > testcases/$const; done
i=0; strings "${1}"| while read line; do echo -n "$line" > testcases/string_${i} ; i=$[ $i + 1 ] ; done
@richinseattle
richinseattle / fork.c
Created November 16, 2019 06:50 — forked from Cr4sh/fork.c
fork() for Windows
/*
* fork.c
* Experimental fork() on Windows. Requires NT 6 subsystem or
* newer.
*
* Copyright (c) 2012 William Pitcock <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@richinseattle
richinseattle / Installer.dll
Created January 3, 2020 02:58 — forked from msuiche/Installer.dll
Installer.dll (Vault7)
// Decompiled with JetBrains decompiler
// Type: Installer.Install
// Assembly: Installer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 1DF6A781-016A-4A47-9C62-874A888EB357
// Assembly location:
using \u0004;
using \u0006;
using Microsoft.Win32;
using System;