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 | <% elsif %> |
Discover gists
// 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 |
/** | |
* 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, |
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
// ------------------------- | |
// useMediaQuery | |
import { useState, useEffect, useLayoutEffect } from "react"; | |
export function useMediaQuery(query: string) { | |
const [matches, setMatches] = useState(false); | |
useEffect(() => { | |
const media = window.matchMedia(query); |
Author: Chris Lattner
// ==UserScript== | |
// @name No YouTube Volume Normalization | |
// @namespace https://gist.github.com/abec2304 | |
// @match https://www.youtube.com/* | |
// @grant none | |
// @version 2.1 | |
// @author abec2304 | |
// @description Enjoy YouTube videos at their true volume | |
// @inject-into content | |
// @run-at document-start |
Summary of passwords by sperglord8008s, updated November 1. 2020. For login try "root", "default", "defaul" or "root" | |
00000000 | |
059AnkJ | |
4uvdzKqBkj.jg | |
7ujMko0admin | |
7ujMko0vizxv | |
123 | |
1111 | |
1234 |
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |
int64_t ipow(int64_t base, uint8_t exp) { | |
static const uint8_t highest_bit_set[] = { | |
0, 1, 2, 2, 3, 3, 3, 3, | |
4, 4, 4, 4, 4, 4, 4, 4, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 255, // anything past 63 is a guaranteed overflow with base > 1 |