Skip to content

Instantly share code, notes, and snippets.

View Chrd26's full-sized avatar
🧨
Let's gooo!

The_Runner_01 Chrd26

🧨
Let's gooo!
View GitHub Profile
@scivision
scivision / AddGitSubmodule.cmake
Last active December 14, 2024 10:44
CMake: init/update a Git submodule and add_subdirectory()
find_package(Git REQUIRED)
function(add_git_submodule dir)
# add a Git submodule directory to CMake, assuming the
# Git submodule directory is a CMake project.
#
# Usage: in CMakeLists.txt
#
# include(AddGitSubmodule.cmake)
# add_git_submodule(mysubmod_dir)
@minorsecond
minorsecond / CMakeLists.txt
Created September 8, 2020 15:56
CMakeLists for macOS App Bundle
cmake_minimum_required(VERSION 3.17)
project(foo)
set(CMAKE_CXX_STANDARD 20)
set(LIBPROC_SRC "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libproc.h")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active November 17, 2025 12:13
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-