start new:
tmux
start new with session name:
tmux new -s myname
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <style type="text/css"> | |
| .app { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| /* the height can be anything: e.g. 100% of parent */ |
| <div id="page"></div> |
| package main | |
| import "fmt" | |
| type day int | |
| const ( | |
| Sunday day = iota | |
| Monday | |
| Tuesday | |
| Wednesday |
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| type foo int | |
| const ( | |
| One foo = iota |
| Latency Comparison Numbers | |
| -------------------------- | |
| 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 | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |
I used to think that
ssh -X me@some.box
"just bloody worked". However this might not work - ssh must play ball on both sides of the link. On the remote (ssh server, X client) sshd must sit behind some port, tell Xlib to send X11 requests to it and then forward them back to you the X server (where the ssh client is). If the remote box is locked down to prevent this, you will get:
X11 forwarding request failed on channel 0
as part of an otherwise working login.
| @echo off | |
| SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe | |
| rem add it for all file types | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f | |
| @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f | |
| rem add it for folders | |
| @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f |
| func main() { | |
| listener, err := net.Listen("tcp", listenAddr) | |
| if err != nil { | |
| log.Fatal(err) | |
| } | |
| for { | |
| conn, err := listener.Accept() | |
| if err != nil { | |
| log.Fatal(err) | |
| } |
| func main() { | |
| listener, err := net.Listen("tcp", listenAddr) | |
| if err != nil { | |
| log.Fatal(err) | |
| } | |
| for { | |
| conn, err := listener.Accept() | |
| if err != nil { | |
| log.Fatal(err) | |
| } |