- ✅/✔️: Correct. Use it when you want to assert something is factual. Use it with care, and be skeptical of yourself. It can also be used to say something is "done".
- ⬆️/🔼/☝️/👆: ×2/ditto. When you want to repeat whatever someone said, without actually repeating. Useful to emphasize/approve the content of a message, even if you disagree with the person that said it.
- 👍: Like. To show agreement or subjective approval, or to say that you simply like/support something. Can be used to say "got it", "thanks", and even "you're welcome".
- 💯: Definitely/definitively. When you absolutely couldn't agree more! Keep in mind this is still subjective. Don't use it for facts, unless paired with "✅".
- ❤️: Love!. Use it to show your fondness or appreciation for something/someone. I won't go into details about colors, as there's no consensus. Can be used to say "thank you!".
- 🗿: Based. Use it when someone is a giga-chad or said something [based](https://www.urbandictionary.com/define.php?term=ba
Bypass disable-devtool
(Working as of 2025-02-09)
There are websites that use disable-devtool to prevent you from opening or using devtools. They typically prevent you from right clicking or using the keyboard shortcut to open devtools. Even if you successfully do so, they detect it and redirect you elsewhere. You can bypass this by using one of the following ways.
If the shortcut F12 on Windows or Option + ⌘ + I on Mac do not work. Press the three vertically aligned dots in the top right corner of your Google Chrome or Microsoft Edge window. Under the section "More Tools", you'll see the option to select "Developer Tools" which opens the toolkit in your window.
- Feature Name:
pattern_types - Start Date: (fill me in with today's date, YYYY-MM-DD)
- RFC PR: rust-lang/rfcs#0000
- Rust Issue: rust-lang/rust#0000
This RFC introduces pattern types, which are subtypes of matchable types that
are statically restricted to a subset of the variants of the original type.
Let's list here crates that enhance Rust as a language.
It not "batteries" like in stdx, but Rust-specific crates for workarounds for various missing features and experimental ideals from non-accepted/postponed RFCs, or just hacky tricks.
The list is supposed to contain (mostly) crates that are internal to Rust, not ones for making Rust deal with "external world" like other languages bindings, file formats, protocols and so on.
Primary focus should be on crates that are not easy to find by conventional means (e.g. no algorithm name, format or protocol to search for).
Note that quality of the listed crates may vary from proof-of-concept to stable-and-widely-used.
| import random | |
| import typing.List | |
| def thanos_sort(a: List[int]) -> List[int]: | |
| '''Removes half of the list until it's perfectly balanced, like all things should be.''' | |
| def _perfectly_balanced(a: List[int]) -> bool: | |
| like_all_things_should_be = True | |
| enum RecursionResult<C, R> { | |
| Continue(C), | |
| Return(R), | |
| } | |
| fn tail_recurse<C, R>(mut init: C, mut f: impl FnMut(C) -> RecursionResult<C, R>) -> R { | |
| loop { | |
| match f(init) { | |
| RecursionResult::Continue(c) => init = c, | |
| RecursionResult::Return(r) => return r, |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| def load_gist(gist_id): | |
| """translate Gist ID to URL""" | |
| from json import load | |
| from urllib import urlopen | |
| gist_api = urlopen("https://api.github.com/gists/" + gist_id) |
| #!/bin/sh | |
| LANG=C | |
| compile() { | |
| # some preprocessing and basic optimizations | |
| code=$(printf %s "$1" | | |
| (tr -dc '\133\135<>,.+-'; echo) | # ksh's builtin tr doesn't like []<>,.+- | |
| sed -e :a -e 's/<>//g;s/><//g;s/+-//g;s/-+//g | |
| s/\[-]/z/g;s/zzz*/z/g;s/[+-]z/z/g;ta') |
| print(''.join([chr(x) for x in [int(x,16) for x in \ | |
| [str(hex(2 * 2 * 5 * 7 * 37 * 149 * 5417 * 148781 \ | |
| * 51939996061871)[i:(i+2)])\ | |
| for i in range(25)][2::2]]])) |