Skip to content

Instantly share code, notes, and snippets.

View show-binary-dependencies.md

General UNIX/Linux

$ ldd <binary>

macOS

$ otool -L <binary>
@mcandre
mcandre / windows-install-msvc-and-clang.md
Last active May 1, 2021
Windows Install MSVC and clang
View windows-install-msvc-and-clang.md

Windows Install MSVC and clang

  1. Install Chocolatey.
  2. Launch a PowerShell terminal in administrator mode.
  3. Install visualstudio2019community.
  4. Install the Visual Studio 2019 native C++ Desktop workload with the optional MSVC and clang components included:
PS C:\> choco install --force visualstudio2019-workload-nativedesktop --package-parameters "--includeOptional"
@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