使用 main 分支,启动三个节点,bootstrap,节点 A 和节点 B
- A 监听 8003 端口提供 API
- B 监听 8004 端口提供 API
A 创建一个组,owner 是 A
I hereby claim:
To claim this, I am signing this object:
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| badger "github.com/dgraph-io/badger/v3" | |
| badgerOptions "github.com/dgraph-io/badger/v3/options" | |
| ) |
| #include <event2/buffer.h> | |
| #include <event2/bufferevent.h> | |
| #include <event2/event.h> | |
| #include <event2/listener.h> | |
| #include <event2/util.h> | |
| #include <arpa/inet.h> | |
| #include <fcntl.h> | |
| #include <netinet/in.h> | |
| #include <signal.h> |
| #! /bin/bash | |
| app_path=build/flameshot.app/Contents | |
| bin_path="$app_path/MacOS" | |
| CreateApp() { | |
| rm -rf build/flameshot.app | |
| mkdir -p $bin_path && cp build/src/flameshot $bin_path/flameshot | |
| echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | |
| <!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> | |
| <plist version=\"1.0\"> |
| diff --git a/tg/controllers.py b/tg/controllers.py | |
| index e608d94..f861a89 100644 | |
| --- a/tg/controllers.py | |
| +++ b/tg/controllers.py | |
| @@ -873,7 +873,7 @@ class Controller: | |
| return | |
| # notify | |
| - if self.model.is_me(msg["sender_user_id"]): | |
| + if self.model.is_me(msg["sender"].get("user_id")): |
| docker container create --name temp -v the-craft-of-selfteaching:/data alpine | |
| docker cp . temp:/data | |
| docker rm temp | |
| ## macos only | |
| docker run -it --rm --privileged --pid=host justincormack/nsenter1 | |
| https://stage.press.one/p/v?s=46af64a5f97f6cc0938a23a2fa6879148d946013a5f55eda9df30155e7994d4cf479bb58ca3e13a60125678525db61fe81de8b1f767143e33aec3c49a5474dea1&h=f9f2860430e7973536650a3ef3f1730941212b431ba05d123ce7d2c400d26a76&a=54e9679b057faa1e38474b8e705625829643f963&f=P1&v=3 |
| [user] | |
| email = [email protected] | |
| name = chux0519 | |
| [core] | |
| excludesfile = ~/.gitignore | |
| editor = nvim | |
| [merge] | |
| tool = kdiff3 | |
| [mergetool] | |
| prompt = false |
| /// Multi-level sort a slice of Foobars according to [(field, reverse)] | |
| fn sort_by_names(f: &mut [Foobar], orderings: &[(Foofields, bool)]) { | |
| use std::cmp::Ordering; | |
| f.sort_by(|a, b| { | |
| let mut cmp = Ordering::Equal; | |
| for (field, reverse) in orderings { | |
| if cmp != Ordering::Equal { | |
| break; | |
| } |