Skip to content

Instantly share code, notes, and snippets.

View maxbechtold's full-sized avatar

Max Bechtold maxbechtold

View GitHub Profile
@Superpat
Superpat / Menu.java
Last active July 11, 2024 13:21
A small java command line api to generate a menu that can return a generic
import java.util.List;
import java.util.Optional;
import java.util.Scanner;
/** Menu api for the command line
* <p>
* Takes a list of options containing a value and a menu title, when called, the menu returns an optional type containing the option.
* </p>
* @author Patrick Marchand <mail@patrickmarchand.com>
* @version 0.2
@umohi
umohi / download-github-artifact
Created September 21, 2018 22:48
use curl to download release artifact from github private repository
# in order to download release artifacts from github, you have to first retreive the
# list of asset URLs using the github repo REST API. Use the asset URL to download
# the artifact as a octet-stream data stream. You will need to get an access token
# from "settings -> developer settings -> personal access tokens" on the github UI
#!/bin/bash -e
owner="MY_ORG_NAME"
repo="MY_REPO_NAME"
tag="ARTIFACT_TAG"
artifact="ARTIFACT_NAME"