Skip to content

Instantly share code, notes, and snippets.

View td0's full-sized avatar
🚝

Tadho td0

🚝
View GitHub Profile
@td0
td0 / spectre.c
Created January 6, 2018 05:55
Spectre Demo
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h>
#pragma optimize("gt",on)
#else
#include <x86intrin.h>
#endif
@td0
td0 / ohshitgit.md
Last active October 4, 2023 13:10
Things to-do if you fuck you git up

Oh shit, git!

Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem.

So here are some bad situations I've gotten myself into, and how I eventually got myself out of them in plain english*.

@td0
td0 / Keybase
Created October 12, 2017 08:48
### Keybase proof
I hereby claim:
* I am td0 on github.
* I am tadho (https://keybase.io/tadho) on keybase.
* I have a public key ASCgZiX6bUnB5fSivF_WeVdkrNRVWx8tx8cfhvbhPFGhXAo
To claim this, I am signing this object:
@td0
td0 / VSCode-custom.css
Last active August 30, 2018 22:13
vscode-styles for operator mono, fira code ligatures, and oceanic next italic
div.window-title, div.panel-header div.title, a.editor-status-mode,
div.results-group, span.quick-open-entry-description>span.monaco-highlighted-label:first-child,
.input, div.column.when span,
.Equinusocio-vsc-material-theme-themes-Material-Theme-Palenight-json .mtk12,
.Equinusocio-vsc-material-theme-themes-Material-Theme-Palenight-json .mtk9,
.Equinusocio-vsc-material-theme-themes-Material-Theme-Palenight-json .mtk4,
.Equinusocio-vsc-material-theme-themes-Material-Theme-Palenight-json .mtk3.mtki.detected-link,
.Equinusocio-vsc-material-theme-themes-Material-Theme-Palenight-json span.mtk11.mtki,
.Tyriar-theme-sapphire-theme-bright-json .mtk6,
.zhuangtongfa-Material-theme-themes-OneDark-Pro-json .mtk6,
@td0
td0 / MacChargeChime.sh
Last active December 28, 2023 01:09
to turn mac charging sound on
defaults write com.apple.PowerChime ChimeOnAllHardware -bool true;
open /System/Library/CoreServices/PowerChime.app
@td0
td0 / README.md
Last active November 13, 2017 12:15 — forked from ahmozkya/README.md
Homebrew with DNSMasq + DNSCrypt-proxy (OpenDNS)

Install & Configure

  1. Install DNSMasq
$ brew install dnsmasq
  1. Install DNSCrypt-proxy
$ brew install dnscrypt-proxy
@td0
td0 / SMBDIS.ASM
Created September 9, 2016 13:20 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@td0
td0 / osx-elcapitan.sh
Created August 17, 2016 10:24
OS X El Capitan setup
#!/bin/sh
# Command Line Tools
xcode-select --install
# Sudo
sudo -v
while true; do sudo -n true; sleep 60; kill -0 $$ || exit; done 2>/dev/null &
# Homebrew
git reset --hard <old-commit-id>
git push -f <remote-name> <branch-name>
Undo a commit and redo
$ git commit -m "Something terribly misguided" (1)
$ git reset --soft HEAD~ (2)
<< edit files as necessary >> (3)
$ git add ... (4)
$ git commit -c ORIG_HEAD (5)