This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| # THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
| # PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
| # | |
| # | |
| # Libraries and infrastructure | |
| sudo apt update -y | |
| sudo apt install -y \ | |
| docker.io docker-buildx \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| #!/bin/sh -e | |
| # | |
| # This is a terrible hack of a Github script to change the name of your | |
| # default or main branch from 'master' to 'trunk', both in your local | |
| # repo and on Github. I don't usually write shell scripts, so if someone | |
| # wants to clean it up and make it robust, that'd be great. | |
| # | |
| # As to why you might want to rename your default branch... | |
| # | |
| # Consider that the entire metaphor of source control is that of a |
| #!/bin/sh | |
| # Set up Rails app. Run this script immediately after cloning the codebase. | |
| # Exit if any subcommand fails | |
| set -e | |
| # Copy over configs | |
| if ! [ -f .env ]; then | |
| cp .sample.env .env |
| let mix = require("laravel-mix"); | |
| let tailwindcss = require("tailwindcss"); | |
| let glob = require("glob-all"); | |
| let PurgecssPlugin = require("purgecss-webpack-plugin"); | |
| /** | |
| * Custom PurgeCSS Extractor | |
| * https://github.com/FullHuman/purgecss | |
| * https://github.com/FullHuman/purgecss-webpack-plugin | |
| */ |
Then in the VM:
| #!/usr/bin/env bash | |
| # Set environment variables for dev | |
| export APP_ENV=local | |
| export APP_PORT=80 | |
| export DB_PORT=3306 | |
| export DB_ROOT_PASS=secret | |
| export DB_NAME=homestead | |
| export DB_USER=homestead | |
| export DB_PASS=secret |
| FROM php:fpm-alpine | |
| RUN apk add --no-cache --update icu-libs icu icu-dev | |
| RUN docker-php-ext-install intl pdo pdo_mysql |