File tree 4 files changed +58
-3
lines changed
4 files changed +58
-3
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,29 @@ cargo OPTIONS COMMAND
21
21
| ` test ` | Run the tests. |
22
22
| ` update ` | Update dependencies in the ` Cargo.lock ` file. |
23
23
24
+ Creating new rust project:
25
+
24
26
``` shell
25
27
cargo new myproject
26
- cd myproject
28
+ ```
29
+
30
+ Add new dependency and feature:
31
+
32
+ ``` shell
27
33
cargo add iced
28
- # Create your script...
34
+ cargo add bevy -F wayland
35
+ ```
36
+
37
+ Build and run for development:
38
+
39
+ ``` shell
29
40
cargo run
30
41
```
31
42
32
- More details on ` cargo update ` and ` Cargo.toml `
43
+ ::: tip
44
+ More details on how ` cargo update ` and ` Cargo.toml ` works
33
45
[ here] ( https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html ) .
46
+ :::
34
47
35
48
### Release builds
36
49
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ is useful to write lines to the file
73
73
``` rust
74
74
use std :: fs;
75
75
use std :: io :: prelude :: * ;
76
+ use std :: io :: BufReader ;
76
77
77
78
let path = " config" ;
78
79
Original file line number Diff line number Diff line change @@ -3,6 +3,24 @@ title: Maintenance
3
3
ref : https://wiki.archlinux.org/title/System_maintenance
4
4
---
5
5
6
+ ## Downgrade package
7
+
8
+ [ Arch Wiki reference] ( https://wiki.archlinux.org/title/Downgrading_packages )
9
+
10
+ Check the latest updates in ` /var/log/pacman.log ` .
11
+ To downgrade a package, run (example of ` svt-av1 ` ):
12
+
13
+ ``` shell
14
+ sudo pacman -U file:///var/cache/pacman/pkg/svt-av1-2.2.1-1-x86_64.pkg.tar.zst
15
+ ```
16
+
17
+ Then to prevent upgrade of that package,
18
+ edit ` /etc/pacman.conf ` :
19
+
20
+ ``` txt
21
+ IgnorePkg = svt-av1
22
+ ```
23
+
6
24
## System cleanup
7
25
8
26
Every week, delete all cached versions of installed and uninstalled packages,
Original file line number Diff line number Diff line change @@ -4,9 +4,32 @@ title: Date
4
4
5
5
## Usage
6
6
7
+ ``` shell
8
+ date OPTIONS FORMAT
9
+ ```
10
+
11
+ | Option | Description |
12
+ | -- | -- |
13
+ | ` -d ` ` --date ` | Use specified date instead of now. |
14
+
15
+ ## Examples
16
+
17
+ Get formatted current time:
18
+
7
19
``` shell
8
20
date # Wed 20 May 2020 01:17:13 PM JST
9
21
date ' +%Y-%m-%d %H:%M:%S' # 2020-05-20 13:18:19
22
+ ```
23
+
24
+ Specify date relative to now:
25
+
26
+ ``` shell
10
27
date -d ' +1 year'
11
28
date -d ' 1 year ago'
12
29
```
30
+
31
+ Specify date using a timestamp:
32
+
33
+ ``` shell
34
+ date -d @1735976522
35
+ ```
You can’t perform that action at this time.
0 commit comments