Skip to content

Instantly share code, notes, and snippets.

@ffoodd
ffoodd / improved-sr-only.markdown
Last active May 3, 2024 15:23
Improved .sr-only

Improved .sr-only

Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.

A Pen by ffoodd on CodePen.

License.

@fnky
fnky / ANSI.md
Last active May 3, 2024 15:23
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@bryant988
bryant988 / zillow.js
Last active May 3, 2024 15:23
Zillow Image Downloader
/**
* NOTE: this specifically works if the house is for sale since it renders differently.
* This will download the highest resolution available per image.
*/
/**
* STEP 1: Make sure to *SCROLL* through all images so they appear on DOM.
* No need to click any images.
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 15:22
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@paolocarrasco
paolocarrasco / README.md
Last active May 3, 2024 15:20
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@ardakazanci
ardakazanci / CircularMenuGroup.kt
Created April 10, 2024 07:33
Circular Menu Group with Jetpack Compose
@Composable
fun CircularMenuGroup(
icons: List<ImageVector>,
baseRadius: Float,
modifier: Modifier = Modifier,
backgroundColor: Color = Color(0xFF21FA90),
shadowElevation: Dp = 4.dp
) {
var selectedIndex by remember { mutableIntStateOf(-1) }
var sizeSliderValue by remember { mutableFloatStateOf(1f) }
export BLACK="\033[0;38;5;0m"
export MAROON="\033[0;38;5;1m"
export GREEN="\033[0;38;5;2m"
export OLIVE="\033[0;38;5;3m"
export NAVY="\033[0;38;5;4m"
export PURPLE="\033[0;38;5;5m"
export TEAL="\033[0;38;5;6m"
export SILVER="\033[0;38;5;7m"
export GREY="\033[0;38;5;8m"
export RED="\033[0;38;5;9m"
@iamkalai
iamkalai / Add Variable Set.js
Last active May 3, 2024 15:18
ServiceNow Snippets
(function () {
var getCatalog = new GlideRecord("sc_cat_item");
getCatalog.addEncodedQuery("active=true^hide_sp=false^sys_class_name=sc_cat_item"); //Update this
getCatalog.query();
while (getCatalog.next()) {
var addVariableSet = new GlideRecord("io_set_item");
addVariableSet.initialize();
addVariableSet.sc_cat_item = getCatalog.getValue("sys_id");
addVariableSet.variable_set = "86f3c8b51b0d9c508ed631d7dc4bcbcd"; //variable set sys_id
@jboner
jboner / latency.txt
Last active May 3, 2024 15:17
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD