Skip to content

Instantly share code, notes, and snippets.

b01 /
Last active February 1, 2023 17:10
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
set -e
# Auto-Get the latest commit sha via command line.
get_latest_release() {
tag=$(curl --silent "${1}/releases/latest" | # Get latest release from GitHub API
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value
b01 / json-to-src
Created December 3, 2016 18:13
Sample file to pass a PHP command line script a PHP callable.
View json-to-src
* Modify the template data.
* @param array $renderData
* @return array
return function (array $renderData) {
$renderData['classNamespace'] = 'Tests\\Companies';