start new:
tmux
start new with session name:
tmux new -s myname
| ranger-cd() { | |
| tempfile=$(mktemp) | |
| ranger --choosedir="$tempfile" "${@:-$(pwd)}" < $TTY | |
| test -f "$tempfile" && | |
| if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then | |
| cd -- "$(cat "$tempfile")" | |
| fi | |
| rm -f -- "$tempfile" | |
| } |
| #!/bin/sh | |
| set -e | |
| # Repo info: https://lists.fedoraproject.org/pipermail/fedora-mono/2013-November/000466.html | |
| curl http://download.opensuse.org/repositories/home:/tpokorra:/mono/Fedora_21/home:tpokorra:mono.repo | sudo tee /etc/yum.repos.d/mono.repo | |
| sudo dnf install -y mono-opt mono-opt-devel | |
| git clone https://github.com/fsharp/fsharp | |
| cd fsharp | |
| export PATH=$PATH:/opt/mono/bin | |
| export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig |
| #!/usr/bin/env tclsh | |
| package require sqlite3 | |
| package require fileutil | |
| sqlite3 db :memory: | |
| db eval {CREATE TABLE grades(name TEXT PRIMARY KEY, grade TEXT)} | |
| foreach {name grade} [::fileutil::cat grades.txt] { | |
| if {![regexp {[A-F][+-]?} $grade]} { |
| #!/usr/bin/env tclsh | |
| package require fileutil | |
| namespace eval ::decoder { | |
| # Allow us to use +, -, *, /, etc. as commands outside of the [expr] DSL. | |
| namespace path ::tcl::mathop | |
| } | |
| proc ::decoder::decode-file {filename} { | |
| # Read the entire file into memory as binary. [::fileutil::cat] runs the |
Are you familiar with gemtext, the markup format? Please describe it.
Yes, I'm familiar with gemtext, the markup format. Gemtext is a lightweight markup language designed for use in the Gemini protocol, which is an alternative to HTTP for serving content on the internet.
| # My extra-keys. | |
| extra-keys = [ \ | |
| [ \ | |
| {key: ESC, popup: {macro: "CTRL b d", display: DET}}, \ | |
| {key: "/", popup: BACKSLASH}, \ | |
| {key: -, popup: KEYBOARD}, \ | |
| {key: HOME, display: HOM}, \ | |
| UP, \ | |
| END, \ |
import rere.search(r'cat', 'concatenate') → finds 'cat' anywhere.re.fullmatch(r'cat', 'cat') → must match the entire string.re.findall(r'\d+', 'a1b22c333') → ['1', '22', '333']re.sub(r'\s+', ' ', 'too many spaces') → 'too many spaces'\d digits, \w word chars, \s whitespace