Examples for how to create your own info panel, warning box and other decent looking notification in GitHub markdown.
All the boxes are single/two cell tables or two row tables.
| β You have to read about this |
|---|
| #!/usr/bin/env bash | |
| OPTS=':hxXvfpc:g:s:C:B:' | |
| CLEAN=0 | |
| CLEANED=0 | |
| FORCE=0 | |
| POST_HOOK=0 | |
| VERBOSE=0 |
A metatable in Lua defines various extraneous behaviors for a table when indexed, modified, interacted with, etc. They are Lua's core metaprogramming feature; most well known for being useful to emulate classes much like an OOP language.
Any table (and userdata) may be assigned a metatable. You can define a metatable for a table as such:
-- Our sample table
local tab = {}
-- Our metatable
local metatable = {
-- This table is then what holds the metamethods or metafields| #!/bin/sh | |
| git config --global merge.ff no | |
| git config --global merge.commit no | |
| # However, the problem with this is that git pull = git fetch + git merge. | |
| # So whenever you pull from the remote server, | |
| # you'd be creating an ugly merge commit when | |
| # a simple fast-forward would be warranted. | |
| # To solve this, set pull.ff to yes: | |
| git config --global pull.ff yes |