This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| name = xxx | |
| email = xxx@xxx.com | |
| [init] | |
| defaultBranch = main | |
| [branch] | |
| sort = -commiterdate | |
| [pull] | |
| rebase = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Removes old revisions of snaps | |
| # CLOSE ALL SNAPS BEFORE RUNNING THIS | |
| set -eu | |
| snap list --all | awk '/disabled/{print $1, $3}' | | |
| while read snapname revision; do | |
| snap remove "$snapname" --revision="$revision" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function catchError<T> (promise: T): Promise<[T, null] | [null, T]> { | |
| try { | |
| const data = await promise | |
| return [data, null] | |
| } catch (error) { | |
| return [null, error] | |
| } | |
| } | |
| const [data, error] = await catchError(fetchUser()) |