Skip to content

Instantly share code, notes, and snippets.

@mbinna
mbinna / effective_modern_cmake.md
Last active May 11, 2024 09:23
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@JeffM2501
JeffM2501 / gist:00cf5653f41337d8c9e8db40deb25656
Created March 7, 2021 17:40
Raylib resize fullscreen example
/*******************************************************************************************
*
* raylib [core] example - fullscreen toggle
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or
@TrentSPalmer
TrentSPalmer / 2017-06-18-064710_722x410_scrot.png
Last active May 11, 2024 09:14
fish powerline on ubuntu the easy way
2017-06-18-064710_722x410_scrot.png
@bamtan
bamtan / Patch dylib to IPA.md
Created September 28, 2020 05:43
How to combine a dylib and an IPA file so you can use a modified IPA on jailed iOS
@chranderson
chranderson / nvmCommands.js
Last active May 11, 2024 09:05
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@luboganev
luboganev / CustomInteractionState
Created December 5, 2023 18:38
Jetpack Compose custom focus and other interaction states
/**
* A convenience wrapper around the [Interaction] types
*/
@Immutable
data class CustomInteraction(
val enabled: Boolean = false,
val hovered: Boolean = false,
val pressed: Boolean = false,
val focused: Boolean = false,
@db0sch
db0sch / erb_snippets.md
Last active May 11, 2024 09:01
ERB Snippets (in VS Code with the Ruby extension)

Text Editor ERB Snippets and Bindings

Snippet Tab Trigger Output
ERB tags er <% %>
print ERB tags pe <%= %>
if block if <% if %>...<% end %>
if / else block ife <% if %>...<% else %>...<% end %>
else tag else <% else %>
elsif tag elsif &lt;% elsif %&gt;
@gabrielmlinassi
gabrielmlinassi / hooks.ts
Last active May 11, 2024 08:58
useMediaQuery & useBreakpoints hooks for handling conditional rendering on multiple breakpoints (Adapted for Next.js)
// -------------------------
// useMediaQuery
import { useState, useEffect, useLayoutEffect } from "react";
export function useMediaQuery(query: string) {
const [matches, setMatches] = useState(false);
useEffect(() => {
const media = window.matchMedia(query);
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 11, 2024 08:56
Swift Concurrency Manifesto