| Keybinding | Action |
|---|---|
| Alt + f/b | Move cursor to previous/next word |
| Ctrl + a/e | Move cursor to beginning/end of command |
| Ctrl + xx | Toggle between the start of line and current cursor position |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| ❯ python3 ait.py | |
| 3 | |
| 2 | |
| 1 | |
| blastoff aiter! | |
| 3 | |
| 2 | |
| 1 | |
| blastoff anext! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Ideally, we would manage async access to stdin/stdout/stderr *without* | |
| # setting them to non-blocking mode, because that can break other processes. | |
| # (See https://github.com/python-trio/trio/issues/174 for much more detail.) | |
| # Of course we can call read/write in a separate thread, but then we lose | |
| # cancellation support. | |
| # This file demonstrates a weird hack to make blocking read/write cancellable, | |
| # and thus at least theoretically possible to integrate into Trio as ordinary | |
| # first-class operations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import functools | |
| import contextlib | |
| @contextlib.contextmanager | |
| def indented_output(indent=4, space=chr(32)): | |
| """ Precede each carriage return with some quantity of spaces. | |
| While nesting `indented_output` contexts, be prepared |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hashlib | |
| import json | |
| from decimal import Decimal | |
| from typing import Any, Dict, Type | |
| from typing_inspect import get_args, get_generic_bases, is_generic_type, is_union_type # type: ignore | |
| Json = Dict[str, Any] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Pool: | |
| def __init__(self, pool_size): | |
| self._size = pool_size | |
| self.send_channel, self.receive_channel = trio.open_memory_channel(pool_size) | |
If you wan't a cljs that acts like clj, but for ClojureScript, there are a few minor changes you can make:
First, add the following entry to ~/.clojure/deps.edn under the :deps key:
org.clojure/clojurescript {:mvn/version "1.10.439"}
Then make copies of clj and clojure named cljs and clojurescript, and put those copies on your path.
Just use https://github.com/ripeworks/iro which gets the challenge below right!
Picking a Color on Mac is hard. Mainly due to the fact that several applications floating around the web ( AppStore and independant ), grab the color "incorrectly".
Why incorrectly?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :root { | |
| --ease-in-quad: cubic-bezier(.55, .085, .68, .53); | |
| --ease-in-cubic: cubic-bezier(.550, .055, .675, .19); | |
| --ease-in-quart: cubic-bezier(.895, .03, .685, .22); | |
| --ease-in-quint: cubic-bezier(.755, .05, .855, .06); | |
| --ease-in-expo: cubic-bezier(.95, .05, .795, .035); | |
| --ease-in-circ: cubic-bezier(.6, .04, .98, .335); | |
| --ease-out-quad: cubic-bezier(.25, .46, .45, .94); | |
| --ease-out-cubic: cubic-bezier(.215, .61, .355, 1); |
NewerOlder