Este texto é inspirado em A Half Hour to Learn Rust.
# install git secret (pick one) | |
brew install git-secret | |
sudo apt-get install git-secret | |
# Import keys into gpg from keybase | |
export GPG_TTY=$(tty) # Required for passphrase entry on WSL2 and MacOS | |
keybase pgp export | gpg --import | |
keybase pgp export --secret | bash -c "gpg --import --allow-secret-key-import" | |
# Import keys from user you wish to add |
import asyncio | |
import psycopg2 | |
# dbname should be the same for the notifying process | |
conn = psycopg2.connect(host="localhost", dbname="example", user="example", password="example") | |
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) | |
cursor = conn.cursor() | |
cursor.execute(f"LISTEN match_updates;") |
GET https://api.example.com/player/1234567890 | |
{ | |
"collection": { | |
"version": "1.0", | |
"href": "https://api.example.com/player", | |
"items": [ | |
{ | |
"href": "https://api.example.com/player/1234567890", | |
"data": [ | |
{"name": "playerId", "value": "1234567890", "prompt": "Identifier"}, |
Libuv and libev, two I/O libraries with similar names, recently had the privilege to use both libraries to write something. Now let's talk about my own subjective expression of common and different points.
The topic of high-performance network programming has been discussed. Asynchronous, asynchronous, or asynchronous. Whether it is epoll or kqueue, it is always indispensable to the asynchronous topic.
Libuv is asynchronous, and libev is synchronous multiplexing IO multiplexing.
Libev is a simple encapsulation of system I/O reuse. Basically, it solves the problem of different APIs between epoll and kqueuq. Ensure that programs written using livev's API can run on most *nix platforms. However, the disadvantages of libev are also obvious. Because it basically just encapsulates the Event Library, it is inconvenient to use. For example, accept(3) requires manual setnonblocking after connection. EAGAIN, EWOULDBLOCK, and EINTER need to be detected when reading from a socket. This is a
Number of files that imports the module (~15000 files total) | |
1 oswalkdir | |
1 rstgen | |
1 ftpclient | |
1 distros | |
1 strmisc | |
2 rlocks | |
2 lenientops | |
2 unidecode | |
3 httpserver |
It is possible to connect to Cisco AnyConnect VPN using connman.
First of all connman-vpn should be installed:
apt install connman connman-vpn systemctl disable NetworkManager
Later is required because it is not possible to completely remove NetworkManager because too many packages depend on it.
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.