Skip to content

Instantly share code, notes, and snippets.

View marcizhu's full-sized avatar
🏠
Working from home

Marc marcizhu

🏠
Working from home
View GitHub Profile
@marcizhu
marcizhu / clock.txt
Created August 2, 2018 22:22
DCPU-16 Specifications (v1.7) + Peripherals
Name: Generic Clock (compatible)
ID: 0x12d0b402
Version: 1
Interrupts do different things depending on contents of the A register:
A | BEHAVIOR
---+----------------------------------------------------------------------------
0 | The B register is read, and the clock will tick 60/B times per second.
| If B is 0, the clock is turned off.
@marcizhu
marcizhu / Spectre.cpp
Last active October 6, 2018 11:33
Spectre PoC
/*********************************************************************
*
* Spectre PoC
*
* This source code originates from the example code provided in the
* "Spectre Attacks: Exploiting Speculative Execution" paper found at
* https://spectreattack.com/spectre.pdf
*
* Minor modifications have been made to fix compilation errors and
* improve documentation where possible.
@marcizhu
marcizhu / Downgrade.md
Last active October 31, 2020 01:21
[Downgrade any Homebrew package easily] #brew #macos

Downgrade any Homebrew package easily

This guide will use the package git-delta for illustrative purposes only. Replace that with any package you want to downgrade.

Step 0: Uninstall current version (if installed):

$ brew uninstall git-delta

Step 1: Run brew info git-delta to find the formula link:

@marcizhu
marcizhu / .clang-format
Last active December 11, 2020 22:50
[Clang format config file] Configuration file for clang-format #clangformat #config
BasedOnStyle: WebKit
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: true
AlignConsecutiveMacros: true
AlignEscapedNewlines: Left
AlignTrailingComments: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true