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/sh | |
| # check_forks_upstream.sh | |
| # Lists forks on your GitHub account where you have never contributed: | |
| # 1. No commits on default branch authored by you | |
| # 2. No orphan branches (branches not present in upstream) whose first commit is yours | |
| # | |
| # Usage (GitHub Actions): | |
| # curl -fsSL https://gist.github.com/RichardFevrier/dcfcc55ed38e16be4e6f1288c22399fe/raw/check_forks_upstream.sh \ | |
| # | GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} sh |
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/sh | |
| # find_local_clean_forks.sh | |
| # Recursively finds GitHub forks where nothing needs to be committed or pushed. | |
| # | |
| # Usage (installed): | |
| # find_local_clean_forks.sh <search_path> | |
| # | |
| # Usage (direct from gist, argument passed to sh via -s): | |
| # curl -fsSL https://gist.github.com/RichardFevrier/447c90f54baa9f029c25040f9bf718e5/raw/find_local_clean_forks.sh | sh -s <search_path> |
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/sh | |
| # Usage: | |
| # curl -fsSL https://gist.github.com/RichardFevrier/6e515aaaadc5d3b72906be6f23689867/raw/macOS_cli_create_admin_user.sh | sudo ID=1000 NAME=richard PASSWORD=azerty sh | |
| dscl . -create /Groups/$NAME | |
| dscl . -create /Groups/$NAME gid $ID | |
| dscl . -create /Users/$NAME | |
| dscl . -create /Users/$NAME UserShell /bin/zsh |
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
| #!/usr/bin/env -S python3 -u | |
| # -*- coding: utf-8 -*- | |
| import subprocess | |
| def _main() -> None: | |
| installed_fedora_app_ids: list[str] = [] | |
| process = subprocess.Popen(['flatpak', 'list', '--columns=application,origin'], stdout=subprocess.PIPE) |
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
| #!/usr/bin/ruby | |
| Dir.glob("**/*/") do |filepath| | |
| if File.exist?("#{filepath}.git/") | |
| `cd #{Dir.pwd}/#{filepath} && git gc` | |
| end | |
| end |
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
| #!/usr/bin/ruby | |
| Dir.glob("**/*/") do |filepath| | |
| if File.exist?("#{filepath}.git/lfs/") | |
| `cd #{Dir.pwd}/#{filepath} && git lfs prune` | |
| end | |
| end |
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
| BasedOnStyle: LLVM | |
| BreakBeforeBraces: Linux | |
| ColumnLimit: 135 # fine with a macbook pro 15" screen | |
| IndentWidth: 4 | |
| IndentWrappedFunctionNames: true | |
| MaxEmptyLinesToKeep: 2 | |
| ObjCBinPackProtocolList: Always | |
| ObjCBlockIndentWidth: 4 | |
| ObjCSpaceAfterProperty: true | |
| ObjCSpaceBeforeProtocolList: true |