Skip to content

Instantly share code, notes, and snippets.

@mcandre
mcandre / mac-enable-libfuzzer.md
Created Mar 19, 2021
macOS Enable libFuzzer
View mac-enable-libfuzzer.md
  1. Run brew install llvm --HEAD.
  2. Update certain shell variables:
# Prefer newer LLVM with fuzzing enabled
# shellcheck source=/dev/null
export CC='clang'
export CXX='clang++'
export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
PATH="$(brew --prefix)/opt/llvm/bin:$PATH"
View build.log
$ cat src/zag/main.zig
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
//
// The OK triples from:
// https://github.com/ziglang/zig-bootstrap#supported-triples
//
View diskutility-unborking.md

If DiskUtility is giving you lip, select View -> Show All Devices and erase the outer device.

View unpacker.rb
#!/usr/bin/env ruby
file = File.new('/tmp/default.pcm.dat', 'rb')
while bytes = file.read(4) do
puts bytes.unpack('l>')[0]
end
View davinci-resolve-fix-paste.md

If pasting clips are appearing before the beginning of the track, then clear all in and out marks.

@mcandre
mcandre / vscode-fix-paste-indentation.md
Created Jul 28, 2020
VSCode: Fix Paste Indentation
View vscode-fix-paste-indentation.md

VSCode has a nasty habit of nesting pasted text deeper than it should be. To stop this from happening, configure:

{
    "editor.autoindent": "advanced"
}
@mcandre
mcandre / windows-tablet-unsplit-screen.md
Created Jul 10, 2020
Windows Tablet unsplit screen
View windows-tablet-unsplit-screen.md
  1. Swipe downward from the very top of the screen.
  2. Drag the app from a vertical split into either a left or right horizontal split.
  3. Swipe down from the very top of the screen.
  4. Drag the app to the middle, forming a regular, full screen split.

Annoying, but it works.

@mcandre
mcandre / launch-valorant.md
Created Jun 16, 2020
Launch Valorant (from CLI, Steam, GOG, etc.)
View launch-valorant.md
"C:\Riot Games\Riot Client\RiotClientServices.exe" --launch-product=valorant --launch-patchline=live
@mcandre
mcandre / windows-disable-expose-on-tile.md
Created Jun 5, 2020
Windows Disable Expose on Tile
View windows-disable-expose-on-tile.md

By default, Windows since v7 does an annoying Expose-like action every time an application window is tiled/snapped. Fortunately, this can be disabled in recent versions as follows:

  1. Select Start -> Multitasking settings.
  2. Uncheck When I snap a window, show what I can snap next to it.