{"id":15432463,"url":"https://github.com/thomasrayner/ps10yearcodegolf","last_synced_at":"2025-07-04T13:34:41.652Z","repository":{"id":116918481,"uuid":"73413115","full_name":"thomasrayner/PS10YearCodeGolf","owner":"thomasrayner","description":null,"archived":false,"fork":false,"pushed_at":"2016-11-14T17:23:41.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-18T07:38:14.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasrayner.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-10T19:14:42.000Z","updated_at":"2020-07-14T01:55:45.000Z","dependencies_parsed_at":"2023-04-19T06:17:42.167Z","dependency_job_id":null,"html_url":"https://github.com/thomasrayner/PS10YearCodeGolf","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"8d57320ed2dc6bbfae318370d33378f62728a9f1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thomasrayner/PS10YearCodeGolf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasrayner%2FPS10YearCodeGolf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasrayner%2FPS10YearCodeGolf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasrayner%2FPS10YearCodeGolf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasrayner%2FPS10YearCodeGolf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasrayner","download_url":"https://codeload.github.com/thomasrayner/PS10YearCodeGolf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasrayner%2FPS10YearCodeGolf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263550773,"owners_count":23478867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T18:26:41.785Z","updated_at":"2025-07-04T13:34:41.627Z","avatar_url":"https://github.com/thomasrayner.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"#PowerShell 10 Year Anniversary Celebration Code Golf\nThis repo holds the Pester tests for the three Code Golf holes for the [PowerShell 10 Year Anniversary Celebration](https://channel9.msdn.com/Events/PowerShell-Team/PowerShell-10-Year-Anniversary).\n\nCredits: Thomas Rayner ([@MrThomasRayner](http://twitter.com/mrthomasrayner)) and Will Anderson ([@GamerLivingWill](https://twitter.com/GamerLivingWill)).\n\n##What is code golf?\nCode golf is a \"solve this scripting puzzle\" competition with a twist. In addition to coming up with the PowerShell script to solve a given puzzle, you must do so in as few characters as possible. This means using aliases, exploiting strange language behaviors, and being generally tricky.\n\nFor example, let's say that one hole (aka puzzle) was \"Return the names of all of the files in the present working directory\". One code golfer might submit `Get-ChildItem | Select-Object -Property Name` and another code golfer might submit `ls|select n*`.\n\nThe first golfer has code that is far more compliant with best practices, but the second golfer would win the hole by accomplishing the given task in fewer characters.\n\n\n##This Competition\nFor the 10 year anniversary of PowerShell, we are putting out three holes of code golf on [code-golf.com](http://code-golf.com) which can be found here:\n\n1. Hole 1 - [http://www.code-golf.com/problem/view/PowerShell%2010%20Year%20Anniversary%20-%20Hole%201]\n\n2. Hole 2 - [http://www.code-golf.com/problem/view/PowerShell%2010%20Year%20Anniversary%20-%20Hole%202]\n\n3. Hole 3 - [http://www.code-golf.com/problem/view/PowerShell%2010%20Year%20Anniversary%20-%20Hole%203]\n\nEach hole has a unique challenge for golfers to attempt to accomplish in as few characters as possible. Each hole also has an associated Pester test (hosted in this GitHub repo and linked on the code-golf.com page) that the submission must pass in order for a user's submission to be considered valid.\n\nSubmit your code for a given hole by signing into code-golf.com with your GitHub account and following the steps on the code-golf.com site to submit a solution.\n\nThe winner of each hole will be the person whose submission:\n- Uses the fewest characters\n- Passes the Pester test for the hole\n- Was submitted first\n\nSubmissions will be evaluated and winners announced soon after the PowerShell 10 Year Anniversary Celebration is over.\n\n##How do I know if my code passes the Pester test for the hole?\nFirst you need to make sure you have Pester installed and loaded. Just run `get-module pester` to determine if it's loaded. If you get nothing back, run `import-module pester`. If that command doesn't complete successfully, you probably don't have the Pester module installed. Run `Install-Module -Name Pester -Scope CurrentUser` followed by the import command again.\n\nIf you have Pester installed, all you need to do is download the Pester test for the hole (named Hole1/2/3.tests.ps1), call it from the commandline and pass it your submission as a string, like so.\n`.\\Hole1.Tests.ps1 -UserSubmission 'ls|select n*'`\nMake sure to wrap your code in single quotation marks, not double quotation marks. Also, if your submission is more than one line, consider replacing the line breaks with semi-colons which count for the same number of characters in this case. If you cannot provide a single line submission or have other issues passing your submission as a parameter to the Tests.ps1 script, you may consider opening the Tests.ps1 file and editing it manually. **We recommend passing your submission to the Pester test script as a parameter.**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasrayner%2Fps10yearcodegolf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasrayner%2Fps10yearcodegolf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasrayner%2Fps10yearcodegolf/lists"}