Skip to content

Instantly share code, notes, and snippets.

@candlerb
candlerb / go-project-layout.md
Last active April 24, 2024 19:22
Suggestions for go project layout

If someone asked me the question "what layout should I use for my Go code repository?", I'd start by asking back "what are you building: an executable, or a library?"

Single executable

Stage 1: single source file

Create a directory named however you want your final executable to be called (e.g. "mycommand"), change into that directory, and create the following files:

@tenthree
tenthree / _vue.config.js
Last active January 15, 2021 12:52
@vue/cli project configure example (with default scss settings)
// --------------------------------------------------
// require modules
// --------------------------------------------------
const pkg = require('./package.json')
const path = require('path').posix
const exec = require('child_process').execSync
const BannerPlugin = require('webpack/lib/BannerPlugin.js')
// --------------------------------------------------
// Prerender routes
@tenthree
tenthree / fake-images.js
Created June 24, 2019 08:22
fake-images middleware for local development
module.exports = function () {
//
// [ express middleware ]
// Generate a /fake/images route for testing images source
//
// images service origin:
// - PICSUM(https://picsum.photos)
// Created by David Marby & Nijiko Yonskai
// Having trouble? Poke @DMarby on Twitter
// Images from unsplash