-
Notifications
You must be signed in to change notification settings - Fork 5
Randomized memorable container hostnames via dice button #343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
bbdf045
Initial plan
Copilot 012a7f8
feat: add dice button for random memorable container hostnames
Copilot e8d15f2
feat: replace location nouns with animals, objects, celestial, and wh…
Copilot 998a65e
Merge branch 'main' into copilot/randomized-container-names
Bobzemob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| // Adjective 1: opinion, size, age, shape (first position in English adjective order) | ||
| const ADJECTIVES_1 = [ | ||
| // opinion | ||
| 'silly', 'funny', 'brave', 'jolly', 'witty', 'wild', 'bold', 'lucky', 'happy', 'quirky', | ||
| 'clever', 'calm', 'eager', 'merry', 'kind', | ||
| // size | ||
| 'tiny', 'little', 'mini', 'large', 'giant', 'tall', 'slim', 'grand', 'vast', 'huge', | ||
| 'petite', 'great', | ||
| // age | ||
| 'ancient', 'young', 'modern', 'fresh', 'classic', 'eternal', 'timeless', 'early', | ||
| // shape | ||
| 'round', 'oval', 'flat', 'curved', 'narrow', 'hollow', 'crisp', 'sharp', 'smooth', 'steep', | ||
| ]; | ||
|
|
||
| // Adjective 2: color, origin, material, purpose (second position in English adjective order) | ||
| const ADJECTIVES_2 = [ | ||
| // color | ||
| 'red', 'blue', 'green', 'amber', 'silver', 'violet', 'cyan', 'jade', 'teal', 'coral', | ||
| 'ivory', 'azure', 'golden', 'crimson', 'scarlet', 'cobalt', 'indigo', 'olive', 'pink', 'rose', | ||
| // origin | ||
| 'arctic', 'alpine', 'coastal', 'forest', 'ocean', 'lunar', 'solar', 'polar', 'urban', | ||
| 'highland', 'valley', 'desert', 'tropical', 'nordic', 'eastern', 'western', | ||
| // material | ||
| 'wooden', 'marble', 'crystal', 'iron', 'steel', 'copper', 'glass', 'stone', 'velvet', | ||
| 'cedar', 'maple', 'granite', 'bronze', 'woven', 'flint', 'birch', | ||
| // purpose | ||
| 'noble', 'prime', 'bright', 'royal', 'sacred', 'silent', 'mystic', 'cosmic', 'radiant', | ||
| 'steady', 'keen', | ||
| ]; | ||
|
|
||
| const NOUNS = [ | ||
| // animals | ||
| 'badger', 'falcon', 'ferret', 'otter', 'raven', 'gecko', 'panda', 'jaguar', 'narwhal', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missed opportunity for Octopus |
||
| 'quokka', 'axolotl', 'capybara', 'wombat', 'dingo', 'lemur', 'marmot', 'tapir', 'viper', | ||
| // objects / tools | ||
| 'anvil', 'lantern', 'compass', 'sextant', 'pendulum', 'prism', 'dynamo', 'turbine', | ||
| 'wrench', 'chisel', 'piston', 'sprocket', 'pulley', 'bellows', 'lathe', | ||
| // celestial / scientific | ||
| 'comet', 'photon', 'neutron', 'quasar', 'nebula', 'pulsar', 'proton', 'cyclone', | ||
| // whimsical / abstract | ||
| 'riddle', 'fable', 'cipher', 'totem', 'sigil', 'emblem', 'omen', 'mantra', 'lore', | ||
| ]; | ||
|
|
||
| function pick<T>(arr: T[]): T { | ||
| return arr[Math.floor(Math.random() * arr.length)]; | ||
| } | ||
|
|
||
| export function randomHostname(): string { | ||
| return `${pick(ADJECTIVES_1)}-${pick(ADJECTIVES_2)}-${pick(NOUNS)}`; | ||
| } | ||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.