Change a Mac computer name:
sudo scutil --set ComputerName "newname"
sudo scutil --set LocalHostName "newname"
sudo scutil --set HostName "newname"
dscacheutil -flushcache
Reboot.
| #!/usr/bin/env sh | |
| if [ $# -eq 0 ]; then | |
| echo "Usage: apkcg <command> [options]" | |
| echo "Note: Quote wildcards to prevent shell expansion (e.g., apkcg search \"php*8.2*xml*\")" | |
| echo "Examples:" | |
| echo " apkcg search curl" | |
| echo " apkcg info busybox" | |
| echo " apkcg list --available" | |
| exit 1 |
| #!/usr/bin/env sh | |
| if [ $# -eq 0 ]; then | |
| echo "Usage: apksearch <search_term>" | |
| echo "Note: quote wildcards to prevent shell expansion (e.g., apksearch \"php*8.2*xml*\")" | |
| exit 1 | |
| fi | |
| # Ref: https://edu.chainguard.dev/chainguard/migration/migrating-to-chainguard-images/#searching-for-packages |
| package main | |
| import "fmt" | |
| type Duck interface { | |
| Swim() | |
| Quack() | |
| } | |
| type Mallard struct{} |
| package main | |
| import ( | |
| "sync" | |
| ) | |
| // Adapted from https://go.dev/blog/pipelines | |
| func mergeChannels[T any](channels ...<-chan T) chan T { | |
| var wg sync.WaitGroup | |
| wg.Add(len(channels)) |
Change a Mac computer name:
sudo scutil --set ComputerName "newname"
sudo scutil --set LocalHostName "newname"
sudo scutil --set HostName "newname"
dscacheutil -flushcache
Reboot.
I recommend using a virtualenv:
$ python -m venv venv
# ... assuming that 'python' points to a Python 3.7 installation
Then activate it:
$ source venv/bin/activate
| /** | |
| * Adopted from https://github.com/JonasSchubert/kULID | |
| * | |
| * MIT License | |
| * | |
| * Copyright (c) 2021 GuepardoApps (Jonas Schubert), Christopher J. Campo | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights |
| #!/usr/bin/env sh | |
| # Create a Bitbucket Cloud PR from the command line. Expects the following | |
| # environment variables: | |
| # * BITBUCKET_CLIENT_ID | |
| # * BITBUCKET_CLIENT_SECRET | |
| # | |
| # These can be obtained by creating a Bitbucket "OAuth Consumer". See: | |
| # https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud | |
| # |
Here's a little trick to set a Maven project's version from the command line and environment variables, using a build profile.
Assuming your POM looks something like this:
<artifactId>example</artifactId>
<version>${project.version}</version>
...
<properties>
1.0.0| brew install helm@2 | |
| brew link --force helm@2 |