GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NewDefectus/code-golf: A game designed to let you show off your code-fu by solving problems in the least number of characters.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

2,409 Commits
2,409 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
config
config
 
 
css
css
 
 
db
db
 
 
discord
discord
 
 
docker
docker
 
 
fonts
fonts
 
 
github
github
 
 
golfer
golfer
 
 
hole
hole
 
 
js
js
 
 
langs
langs
 
 
middleware
middleware
 
 
oauth
oauth
 
 
ordered
ordered
 
 
pager
pager
 
 
pie
pie
 
 
pretty
pretty
 
 
public
public
 
 
routes
routes
 
 
session
session
 
 
svg
svg
 
 
t
t
 
 
utils
utils
 
 
views
views
 
 
xt
xt
 
 
zone
zone
 
 
.dockerignore
.dockerignore
 
 
.eslintrc.yml
.eslintrc.yml
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.golangci.toml
.golangci.toml
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
META6.json
META6.json
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
Vagrantfile
Vagrantfile
 
 
build-langs
build-langs
 
 
esbuild
esbuild
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
latest-langs
latest-langs
 
 
logo.svg
logo.svg
 
 
main.go
main.go
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
run-lang.c
run-lang.c
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Code Golf

This is the repository behind https://code.golf

Quickstart

Alternatively, see the Vagrant section below to create a virtual machine with everything pre-installed.

  1. Install dependencies:
  • Docker
  • Docker Compose
  • Go
  • make - most likely already on your system
  • mkcert
  • npm
  1. Install the local CA:
$ make cert
Using the local CA at "~/.local/share/mkcert" ✨
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊


Created a new certificate valid for the following names 📜
 - "localhost"

The certificate is at "./localhost.pem" and the key at "./localhost-key.pem" ✅
  1. Install the NPM packages:
$ npm install
  1. Bring up the website:
$ make dev
  1. Optionally, load information from the code.golf database.
$ go run utils/update_sql_from_api.go
  1. Navigate to https://localhost

Hacking

Some of ancillary scripts are written in Raku, to run these ensure you have a recent install of Raku installed and use Zef to install the dependencies:

$ zef install --deps-only .

Linting

Run make lint to lint the code before a pull request. This lints the Typescript code, then the Go code.

In Visual Studio Code, the following settings are helpful for editor support for ESLint:

"eslint.validate": ["typescript", "typescriptreact"],
"eslint.format.enable": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"

Testing

  1. Run the unit tests:
$ make test
  1. Run the e2e tests:
$ make e2e

Vagrant

Using Vagrant and VirtualBox, with one command you can create a virtual machine, install all of the other dependencies onto it (Docker, Docker Compose, Go, Raku + zef dependencies, npm, etc.), and forward port 443 (https) to it.

  1. Install the dependencies:
  • Vagrant
  • VirtualBox

If you have homebrew, you can install with:

$ brew install vagrant virtualbox
  1. Create the virtual machine:
$ vagrant up
  1. Install certificates. Ideally, you should run the following command outside of the virtual machine, the same as in the quickstart, because it will install the certificate in your browser. Alternatively, you can run the command in a virtual machine shell and then install the certificates manually.
$ make cert

or

$ vagrant ssh --command 'cd /vagrant/ && make cert'
  1. Bring up the website:
$ vagrant ssh --command 'cd /vagrant/ && make dev'
  1. Optionally, load information from the code.golf database.
$ vagrant ssh --command 'cd /vagrant/ && go run utils/update_sql_from_api.go'
  1. Navigate to https://localhost

Database Access

If you have PostgreSQL installed You can access the SQL database directly with the following command. If you are using Vagrant, PostgreSQL is pre-installed.

$ make db-dev

Style

URL slugs are consistently abbreviated (e.g. cheevos, langs, stats) but page titles aren't (e.g. Achievements, Languages, Statistics).

Paginated URLs use a trailing number but only on pages after the first (e.g. /rankings/medals/all, /rankings/medals/all/2, etc.).

About

A game designed to let you show off your code-fu by solving problems in the least number of characters.

code.golf

Resources

Readme
MIT license

Contributing

Contributing
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.