Skip to content

Instantly share code, notes, and snippets.

View pedronavf's full-sized avatar

Pedro Navarro pedronavf

  • Netflix
  • San Jose, CA
View GitHub Profile
@pedronavf
pedronavf / print_target_properties.cmake
Created August 28, 2025 21:00 — forked from end2endzone/print_target_properties.cmake
CMake script to print all properties of a given target. Useful for debugging exported or imported library properties. Inspired from https://stackoverflow.com/questions/32183975/how-to-print-all-the-properties-of-a-target-in-cmake
# Inspired from https://stackoverflow.com/questions/32183975/how-to-print-all-the-properties-of-a-target-in-cmake
# Get all propreties that cmake supports
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST)
# Convert command output into a CMake list
STRING(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
STRING(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
# Prints the given property of the given target.
@pedronavf
pedronavf / tint_build_static.sh
Created May 14, 2025 15:42 — forked from klukaszek/tint_build_static.sh
A bash script used to build Google's Tint library as a single static library. This is done by aggregating all .o files within your out/Release directory, renaming them appropriately to eliminate overlap, and then archiving them.
#! /usr/bin/bash
# Create a temporary directory for uniquely named object files
mkdir -p temp_objs
# Find all .o files in the output directory and copy them to the temp directory
find obj/src/ -name "*.o" | sed '/\(_test\|mock\)/d' | while read -r obj_file; do
# Create a unique name based on the file path (replacing '/' with '_')
unique_name=$(echo "$obj_file" | sed 's/\//_/g')
# Copy the file to the temp_objs directory with the unique name
@pedronavf
pedronavf / ANSI-escape-sequences.md
Created January 10, 2025 19:17 — forked from ConnerWill/ANSI-escape-sequences.md
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@pedronavf
pedronavf / ANSI.md
Created January 10, 2025 03:26 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@pedronavf
pedronavf / hyperlink.sh
Created January 5, 2025 20:48 — forked from stuaxo/hyperlink.sh
Output OSC-8 hyperlink in the terminal
@pedronavf
pedronavf / how-to-ssh-into-windows.md
Created December 8, 2024 15:27 — forked from teocci/how-to-ssh-into-windows.md
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

@pedronavf
pedronavf / FontLoader.swift
Created September 21, 2024 03:34 — forked from muizidn/FontLoader.swift
Using custom font in iOS without register to Info.plist
public class FontLoader {
private enum Error: Swift.Error {
case error(String)
}
/// Register fonts
///
/// - Parameter fonts: Font names
static func registerFonts(fonts: [String]) throws {
let bundle = Bundle(for: FontLoader.self)
http://invisible-island.net/xterm/
XTerm Control Sequences
Edward Moy
University of California, Berkeley
Revised by
@pedronavf
pedronavf / vmmap.py
Created July 19, 2024 11:06 — forked from fxthomas/vmmap.py
Python analysis script for /proc/<pid>/maps data under Linux
#!/usr/bin/python
# coding=utf-8
"""Tool to analyze and display the contents of /proc/<pid>/maps"""
import re
import itertools
import argparse
from dataclasses import dataclass

In PIX, Select Target Process => Launch Win32 and set the following 2 entries according to where Canary / Chrome is installed:

  • Path to executable: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application\chrome.exe"
  • Working directory: "C:\Users\alexis\AppData\Local\Google\Chrome SxS\Application"
  • Command line arguments: --disable-gpu-sandbox --disable-direct-composition
    • You can add those arguments if you want to be able to see the disassembled shader code: --enable-dawn-features=emit_hlsl_debug_symbols,disable_symbol_renaming
  • Launch Suspended unchecked, Launch for GPU capture and Force D3D11On12 checked

Then click on "Launch".

Important: you should close all your Canary / Chrome windows/processes before clicking on the "Launch" button!