sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
| /* Demonstrate how to remove an environment variable from /proc/$pid/environ, | |
| under Linux. | |
| This pseudo file is accessible by other processes with sufficient privileges | |
| (i.e. same user or root) and exposes the original environment vector. | |
| Removing sensitive variables from it can be part of a defense in depth | |
| strategy (i.e. to make it harder for a casual attacker to access it). | |
| */ | |
| /** {{{ MIT No Attribution |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "os/signal" | |
| "strconv" | |
| "syscall" | |
| ) |
| # vim:fileencoding=utf-8:ft=conf | |
| # You can include secondary config files via the "include" directive. | |
| # If you use a relative path for include, it is resolved with respect to the | |
| # location od the current config file. For example: | |
| # include other.conf | |
| # Fonts {{{ | |
| # Font family. You can also specify different fonts for the | |
| # bold/italic/bold-italic variants. By default they are derived automatically, |
| # Check which version of sed is used when you run the `sed` command | |
| # The version that ships with Mac OS X is | |
| # /usr/bin/sed | |
| which sed | |
| # Install gnu-sed using Homebrew | |
| # The `--with-default-names` option configures `sed` to use gnu-sed | |
| # Without that option, you'll need to type `gsed` to use gnu-sed | |
| brew install --default-names gnu-sed |
| #!/usr/bin/env python | |
| # | |
| # Convert .itermcolors files to hex colors | |
| import sys | |
| import xml.etree.ElementTree as ET | |
| def rgb_to_hex(rgb): | |
| return '#%02x%02x%02x' % rgb |
Now tmux, mosh and iTerm2 support the OSC 52 sequence that enables clipboard sharing. However, there is a trap that prevents them from working together.
Mosh accepts OSC 52 sequences with the c; option. However, tmux doesn't send that option when it emits OSC 52 sequences, which means you cannot use tmux and mosh together with the default configuration.
You can override the OSC 52 sequence generated by tmux by adding the following line to your tmux.conf.
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "io" | |
| ) | |
| func main() { | |
| //http.HandleFunc("/", handler) |