(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| class DictionaryUtility: | |
| """ | |
| Utility methods for dealing with dictionaries. | |
| """ | |
| @staticmethod | |
| def to_object(item): | |
| """ | |
| Convert a dictionary to an object (recursive). | |
| """ | |
| def convert(item): |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
| import sys, os, socket | |
| s = socket.socket() | |
| s.bind((sys.argv[1], int(sys.argv[2]))) | |
| s.listen(5) | |
| try: | |
| while True: | |
| conn, addr = s.accept() | |
| path = os.path.join(os.getcwd(), "./"+conn.recv(4096).split("\n")[0].split(" ")[1]) | |
| conn.send((open(path).read() if os.path.isfile(path) else reduce(lambda x,s:x+"\n"+s+("/" if os.path.isdir(s) else ""),sorted(os.listdir(path)),"Directory "+path+" ls")) if os.path.exists(path) else '404: '+path) | |
| conn.close() |
| // https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/crypto/ssh" | |
| ) | |
| const privateKey = `content of id_rsa` |
| #!/usr/bin/env ruby | |
| # Full Contol on Ethnet, IP & TCP headers. Play with it ;) | |
| # to test it: nc -lvp 4444 | |
| # as root: tcpdump -nvvvv 'tcp port 4444' -i wlan0 # change wlan0 to your interface | |
| # or use packetfu to monitor as tcpdump | |
| ## cap = PacketFu::Capture.new(:iface => 'wlan0' , :promisc=> true) | |
| ## cap.show_live(:filter => 'tcp and port 4444') | |
| # libpcap should be installed | |
| # gem install pcaprub packetfu |
| # simple match all query with term facet | |
| ejs.Request() | |
| .indices("myindex") | |
| .types("mytype") | |
| .query(ejs.MatchAllQuery()) | |
| .facet( | |
| ejs.TermsFacet('url') | |
| .field('url') | |
| .size(20)) |