Skip to content

Commit c825452

Browse files
committed
main
1 parent a9dfa59 commit c825452

File tree

5 files changed

+85
-4
lines changed

5 files changed

+85
-4
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# ADB Cheat Sheet
2+
3+
## Device Codename
4+
5+
```sh
6+
adb shell getprop ro.product.device
7+
```
8+
9+
## Flash System with ADB
10+
11+
- (optional) flash recovery with fastboot
12+
13+
```sh
14+
fastboot flash recovery /path/to/recovery.img
15+
```
16+
17+
- reboot to recovery
18+
```sh
19+
adb reboot recovery
20+
# or
21+
fastboot reboot recovery
22+
```
23+
24+
- enable adb sideload in recovery
25+
- factory reset(wipe data)
26+
27+
- flash by adb sideload
28+
29+
```sh
30+
adb sideload /path/to/rom.zip
31+
```
32+
33+
## ABI
34+
35+
```ps1
36+
adb shell getprop ro.vendor.product.cpu.abilist64
37+
adb shell getprop ro.vendor.product.cpu.abilist # all abi
38+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Understanding String Formatting
2+
3+
## Composite Formatting
4+
5+
## `ToString` & `IFormattable`

docs/document/PowerShell/docs/Type System/Extended Type System.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ All objects in PowerShell have five **object views** members:
3939
```
4040
4141
Intrinsic methods and properties are to mimic singular object and collection in a same form.
42-
- `Where`: a method for filtering or slicing by condition. See [Where](/docs/document/PowerShell/docs/Object%20Manipulation/3.Where.md)
43-
- `ForEach`: a method to perform iteration with certain logic or perform casting all items to target type. See [ForEach](/docs/document/PowerShell/docs/Object%20Manipulation/4.ForEach.md#intrinsic-foreach)
42+
- `Where`: a method for filtering or slicing by condition. See [Where](../Object Manipulation/3.Where.md)
43+
- `ForEach`: a method to perform iteration with certain logic or perform casting all items to target type. See [ForEach](../Object Manipulation/4.ForEach.md#Intrinsic%20ForEach)
4444
- `Count`
4545
- `Length`
4646

docs/document/PowerShell/docs/What to Learn for New cmdlet.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,41 @@ help <cmd> | sls 'Accept pipeline input\??\s*true.*$' -Context 5,4
4949

5050
Commonly named parameters for path are `-Path`, `-FilePath`, `-LiteralPath`.
5151
So once the cmdlet supports one of them, you should aware it probably supports one or more of others.
52+
53+
## Member of ParameterSet
54+
55+
Syntax of a cmdlet is not quite clear sometimes, you might just want to inspect parameters by parameterset name.
56+
57+
```ps1
58+
$CommonParams = @(
59+
'Verbose',
60+
'Debug',
61+
'ErrorAction',
62+
'WarningAction',
63+
'InformationAction',
64+
'ProgressAction',
65+
'ErrorVariable',
66+
'WarningVariable',
67+
'InformationVariable',
68+
'OutVariable',
69+
'OutBuffer',
70+
'PipelineVariable',
71+
'WhatIf',
72+
'Confirm'
73+
)
74+
$cmd = Get-Command $Command
75+
$cmd = $cmd -is [System.Management.Automation.AliasInfo] ? (Get-Command $cmd.Definition) : $cmd
76+
($cmd.ParameterSets | ForEach-Object {
77+
$out = [pscustomobject]@{
78+
Name = $_.Name
79+
Parameters = $_.Parameters | Where-Object Name -NotIn $CommonParams
80+
}
81+
$joinParams = @{
82+
Property = 'Name'
83+
Separator = "$([System.Environment]::NewLine)`t"
84+
OutputPrefix = "$($out.Name):$([System.Environment]::NewLine)`t"
85+
OutputSuffix = "`n"
86+
}
87+
$out.Parameters | Join-String @joinParams
88+
}) -join "`n"
89+
```

docs/services/DocumentService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type DocumentInfo = Record<string, { icon: string; description: string }>
88

99
export const documentMap = {
1010
'Csharp Design Patterns': { icon: '👾', description: 'Design Patterns in C#' },
11-
// 'Modern CSharp': { icon: '🦖', description: 'Modernized C# since 2015?' },
11+
'Modern CSharp': { icon: '🦖', description: '' },
1212
Articles: { icon: '📰', description: 'Regular articles' },
1313
Avalonia: { icon: '😱', description: 'AvaloniaUI' },
1414
Docker: { icon: '🐳', description: 'Ultimate Docker' },
@@ -28,7 +28,7 @@ export const documentMap = {
2828
Nix: { icon: '❄', description: 'Reproduce freedom' },
2929
'Entity Framework Core': { icon: '🗿', description: '' },
3030
'HTML & CSS': { icon: '😬', description: '' },
31-
PowerShell: { icon: '🐚', description: 'The first strongly-typed shell! Not bad.' },
31+
PowerShell: { icon: '🐚', description: 'The first strongly-typed shell' },
3232
} as const satisfies DocumentInfo;
3333

3434
export type DocumentName = keyof typeof documentMap;

0 commit comments

Comments
 (0)