Skip to content

Instantly share code, notes, and snippets.

View gkhays's full-sized avatar

Garve Hays gkhays

View GitHub Profile
@gkhays
gkhays / Javadoc-Markdown.md
Last active November 21, 2023 14:26
Using Markdown in Javadoc

Background: A Google search led me to the source code (on GitHub) for ng_model.ts#L124 wherein it looked like the documentation was Javadoc, but with Markdown syntax.

...
* ### Setting the ngModel name attribute through options
*
* The following example shows you an alternate way to set the name attribute. The name attribute is used
* within a custom form component, and the name `@Input` property serves a different purpose.
*
* ```html
@gkhays
gkhays / App-Isolation.md
Last active November 16, 2019 00:21
Isolate building and executing a Rust application in a Docker container

Isolating a Rust Application in a Docker Container

HN user flatroze posted a CLI tool for saving web pages as a single file. A comment posted by mike-cardwell demonstrated how to compile and run the utility within a Docker container.

Compile and install:

$ git clone https://github.com/Y2Z/monolith.git
$ cd monolith
$ docker run --rm -w "$(pwd)" -v "$(pwd):$(pwd)" -u "$(id -u):$(id -g)" rust cargo install --path .
@gkhays
gkhays / EclipseDep.md
Last active June 28, 2019 21:44
Handles the situation when a Maven dependency shows up as a folder

Disable Eclipse Workspace Dependencies

The Eclipse plugin for Maven allows for resolving dependencies in the workspace. However, in my case it was not picking up a new snapshot so I used the following steps to disable the feature.

Folder

vs.

JARs

@gkhays
gkhays / Create-and-Test.md
Last active July 17, 2020 05:13
Empryion Cheat Sheet

Build and Test in the Same Game

  1. Create a New survival game with the W/V ENABLED.
  2. Load game, press ` or ~ (left of the 1 key)
  3. type these commands: gm (god mode fast fly speed)
    cm (creative building)
    im (item Menu (h))
    sbp (Spawn any blueprint) Start Building.
  4. for testing do these commands again:
@gkhays
gkhays / AudioGhostPy.md
Last active March 14, 2019 01:46
Re-implementation of the famed Audio Ghost in Python. For Audio Ghost, see https://github.com/gkhays/AudioGhost.

Text to Speech in Python

A quick project to convert text files to speech.

Getting Started

A best practice in Python is to not "pollute" your entire workspace with Python modules. Instead, segregate them per project. Accordingly, set up and activate a virtual environment.

$ virtualenv .venv
import java.util.List;
import java.util.ArrayList;
import com.twosigma.beakerx.chart.xychart.Plot;
import com.twosigma.beakerx.chart.xychart.plotitem.*;
import com.twosigma.beakerx.chart.Color;
Plot p = new Plot();
p.setTitle("this is a Java plot");
@gkhays
gkhays / ArgosMod.md
Last active September 12, 2018 04:00
Modified Argos Explorer from Empyrion - Galactic Survival

Argos Explorer CargoMOD

This is a customization of the Argos Explorer by Siege.

  • Added cargo bay (mostly for HVs but a small SV will fit as well)
  • Cargo ramp activated by sensor
  • Warp engine is amidship with some protection by trusses
  • Moved the medical bay forward
  • Changed growing plots to other side
  • Moved gravity generator forward
@gkhays
gkhays / docker-tips.md
Created June 5, 2018 02:17
Some Docker tips that should go into the Docker Cheat Sheet

View the file system of offline containers.

ls -l /var/lib/docker/aufs/diff/

Local storage of Docker images.

/var/lib/docker/<storage driver>

Deprecated Docker Tree Command

{
"data-source-name": "Rocket.Chat Identity Collector",
"collector-name": "Identity",
"collector-type": "IDENTITY",
"service-identifier": "RocketChatIdentity",
"version": "1.0.0",
"class": "com.netiq.daas.rocketchat.RocketChatCollectorService",
"allow-connection-test": true,
"ecma-scripts": [],
"service-parms": [

I got all this working in a Dockerfile; see https://github.com/gkhays/dockerfiles/tree/master/oraclejdk8.

Create an Oracle JDK Docker Image

jdk-8u161-linux-x64.tar.gz

wget --no-cookies --no-check-certificate \
  && --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
 &amp;&amp; "http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz"