Skip to content

Instantly share code, notes, and snippets.

@fjpalacios
fjpalacios / arch-i3gaps-install.md
Last active April 18, 2024 19:43
Arch + i3-gaps Install Guide

Arch + i3-gaps Install Guide

First set up your keyboard layout. For example, in Spanish:

   # loadkeys es

For a list of all acceptable keymaps:

   # localectl list-keymaps
@unitycoder
unitycoder / DrawBounds.cs
Last active April 18, 2024 19:40
Draw Bounds with Debug.DrawLine , Draw Box, Draw Runtime Gizmos
void DrawBounds(Bounds b, float delay=0)
{
// bottom
var p1 = new Vector3(b.min.x, b.min.y, b.min.z);
var p2 = new Vector3(b.max.x, b.min.y, b.min.z);
var p3 = new Vector3(b.max.x, b.min.y, b.max.z);
var p4 = new Vector3(b.min.x, b.min.y, b.max.z);
Debug.DrawLine(p1, p2, Color.blue, delay);
Debug.DrawLine(p2, p3, Color.red, delay);
@71
71 / boorkmarklet.md
Last active April 18, 2024 19:39
Lists all participants in a Google Meet meeting.

The following bookmarket shows a popup with the name of the participants separated by newlines.

javascript:-function(maxStrLength = 2000) { try { function findParticipants(current, depth = 0) { if (depth > 7) return; if (typeof current !== "object" || current === null || current === window) return; const descriptors = Object.getOwnPropertyDescriptors(current); for (const prop in descriptors) { if (prop.startsWith('["spaces/')) return Object.values(current); const item = findParticipants(descriptors[prop].value, depth + 1); if (item !== undefined) return item; } } const rootState = Object.entries(window).find(x => x[0].startsWith("closure_lm_"))[1], participants = findParticipants(rootState), names = []; function findName(obj) { for (const prop in obj) { const value = obj[prop]; if (typeof value === "object" && value !== null && typeof value[1] === "string") return value[1]; } } for (let i = 0; i < participants.length; i++) { const name = findName(participants[i]); if (names.indexOf(name) === -1) names.
@LukeMathWalker
LukeMathWalker / audit.yml
Last active April 18, 2024 19:36
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@supechicken
supechicken / root_mi_box_s_2nd_gen.md
Last active April 18, 2024 19:34
A tutorial for rooting Xiaomi TV Box S 2nd Gen (jaws) without UART/teardown

Rooting Xiaomi TV Box S 2nd Gen (jaws) without UART/teardown

Table of contents

  • Prerequisites
  • Step 1: Download the stock ROM for Xiaomi TV Box S 2nd Gen
  • Step 2: Extract boot image from the OTA archive
  • Step 3: Update the system with downloaded OTA archive
  • Step 4: Patch boot image with Magisk
  • Step 5: Unlock bootloader with fastboot
  • Step 6: Reboot to system and complete setup
@bacoords
bacoords / twitter-font-awesome-4.css
Last active April 18, 2024 19:33
Update the Twitter / X Icon in Font Awesome 4
.fa.fa-twitter{
font-family:sans-serif;
}
.fa.fa-twitter::before{
content:"𝕏";
font-size:1.2em;
}
@eneko
eneko / list-of-curl-options.txt
Last active April 18, 2024 19:30
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
@Haaroon
Haaroon / fallout new vegas steam deck mod guide.md
Last active April 18, 2024 19:28
how to install fallout new vegas on steam deck and install mods
@mbinna
mbinna / effective_modern_cmake.md
Last active April 18, 2024 19:26
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

@subfuzion
subfuzion / global-gitignore.md
Last active April 18, 2024 19:25
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.