From 77be4eb172eb0707be3f653189c10738e6090400 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 28 Apr 2020 00:11:18 +0000 Subject: [PATCH] add examples --- brew/brew.bash | 4 ++++ flutter/flutter.bash | 4 ++++ golang/golang.bash | 28 +++++++++++++++++++++++ node/node.bash | 42 ++++++++++++++++++++++++++++++++++ pathman/pathman.bash | 13 +++++++++++ rustlang/rustlang.bash | 12 ++++++++++ serviceman/serviceman.bash | 4 ++++ vim-sensible/vim-sensible.bash | 2 ++ webi/webi.bash | 12 ++++++++++ 9 files changed, 121 insertions(+) diff --git a/brew/brew.bash b/brew/brew.bash index 2cdd6d7..e95a572 100644 --- a/brew/brew.bash +++ b/brew/brew.bash @@ -5,6 +5,10 @@ # tagline: The Missing Package Manager for macOS (or Linux) # description: | # Homebrew installs the stuff you need that Apple (or your Linux system) didn’t. +# examples: | +# ```bash +# brew install node +# ``` # Straight from https://brew.sh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" diff --git a/flutter/flutter.bash b/flutter/flutter.bash index 6fe9688..548ef72 100644 --- a/flutter/flutter.bash +++ b/flutter/flutter.bash @@ -5,6 +5,10 @@ # tagline: UI Toolkit for mobile, web, and desktop # description: | # Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. +# examples: | +# ```bash +# flutter create my_app +# ``` set -e set -u diff --git a/golang/golang.bash b/golang/golang.bash index e61de14..f599c76 100644 --- a/golang/golang.bash +++ b/golang/golang.bash @@ -5,6 +5,34 @@ # tagline: The Go Programming Language tools # description: | # Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. +# examples: | +# ```bash +# mkdir -p hello/ +# pushd hello/ +# ``` +#
+# +# ```bash +# cat << EOF >> main.go +# package main +# +# import ( +# "fmt" +# ) +# +# func main () { +# fmt.Println("Hello, World!") +# } +# EOF +# ``` +#
+# +# ```bash +# go fmt ./... +# go build . +# ./hello +# > Hello, World! +# ``` set -e set -u diff --git a/node/node.bash b/node/node.bash index 33a9abb..cac1272 100644 --- a/node/node.bash +++ b/node/node.bash @@ -5,6 +5,48 @@ # tagline: JavaScript V8 runtime # description: | # Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine +# examples: | +# ```bash +# node -e 'console.log("Hello, World!")' +# > Hello, World! +# ``` +#
+#
+# +# +# +# +# +# +#
Run a webserver

+#   mkdir my-server
+#   pushd my-server
+#   npm init
+#   npm install --save express
+#
+# app.js: +#
+#
'use strict'
+#   var express = require('express');
+#   var app = express();
+#   
+#   app.use('/', function (req, res, next) {
+#     res.end("Hello, World!");
+#   });
+#   
+#   module.exports = app;
+#
+# server.js: +#
+#
'use strict'
+#   var http = require('http');
+#   var app = require('./app.js');
+#   http.createServer(app).listen(8080, function () {
+#     console.log('Listening on', this.address());
+#   });
+#
+#
npm start
+#
set -e set -u diff --git a/pathman/pathman.bash b/pathman/pathman.bash index 82bd622..7de2693 100644 --- a/pathman/pathman.bash +++ b/pathman/pathman.bash @@ -8,6 +8,19 @@ # - Mac, Windows, Linux # - Bash, Zsh, Fish # - Command, Powershell +# examples: | +# ```bash +# pathman add ~/.local/bin +# ``` +#
+# ```bash +# pathman remove ~/.local/bin +# ``` +#
+# ```bash +# pathman list +# ``` + set -e set -u diff --git a/rustlang/rustlang.bash b/rustlang/rustlang.bash index 392356c..df5a8e4 100644 --- a/rustlang/rustlang.bash +++ b/rustlang/rustlang.bash @@ -5,6 +5,18 @@ # tagline: The Rust Toolchain # description: | # A language empowering everyone to build reliable and efficient software. +# examples: | +# ```bash +# cargo install ripgrep +# ``` +#
+# ```bash +# cargo new hello --bin +# cargo build --release +# ./hello +# > "Hello, world!" +# ``` + # Straight from https://rustup.rs/ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh diff --git a/serviceman/serviceman.bash b/serviceman/serviceman.bash index 6aa1779..5398521 100644 --- a/serviceman/serviceman.bash +++ b/serviceman/serviceman.bash @@ -8,6 +8,10 @@ # - Launchd (macOS) # - Systemd (Linux) # - Windows Registry +# examples: | +# ```bash +# serviceman add --name my-service ./serve.js --port 3000 +# ``` set -e set -u diff --git a/vim-sensible/vim-sensible.bash b/vim-sensible/vim-sensible.bash index 891fcaa..f507230 100644 --- a/vim-sensible/vim-sensible.bash +++ b/vim-sensible/vim-sensible.bash @@ -5,6 +5,8 @@ # tagline: sensible defaults for vim # description: | # Think of sensible.vim as one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on. +# examples: | +# N/A mkdir -p $HOME/.vim/pack/plugins/start git clone --depth=1 https://tpope.io/vim/sensible.git $HOME/.vim/pack/plugins/start/sensible diff --git a/webi/webi.bash b/webi/webi.bash index a89f961..af6a4d8 100644 --- a/webi/webi.bash +++ b/webi/webi.bash @@ -5,6 +5,18 @@ # tagline: webinstall.dev for the CLI # description: | # for the people like us that are too lazy even to run `curl https://webinstall.dev/PACKAGE_NAME` - just `webi PACKAGE_NAME` instead +# examples: | +# ```bash +# webi node +# ``` +#
+# ```bash +# webi golang +# ``` +#
+# ```bash +# webi rustlang +# ``` # TODO webi package@semver#channel -- 2.25.1