Skip to content

Instantly share code, notes, and snippets.

View gkhays's full-sized avatar

Garve Hays gkhays

View GitHub Profile
@gkhays
gkhays / README-Template.md
Created April 21, 2020 23:18 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@gkhays
gkhays / Git in Other Tools.md
Last active April 11, 2020 16:00
Using Git in Other Environments

Git in Other Environments

Eclipse

Eclipse comes with EGit.

image

Bash

@gkhays
gkhays / Git Merge and Diff.md
Last active April 11, 2020 15:37
Git external merge and diff tools

External Merge and Diff Tools

Run four config commands

$ git config --global merge.tool extMerge
$ git config --global mergetool.extMerge.cmd \
  'extMerge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"'
$ git config --global mergetool.extMerge.trustExitCode false
$ git config --global diff.external extDiff

Details and Summary Tags in Markdown

Open Me A nice little list.
  • One
  • Two
  • Three
```bash

Simple Shell

Call execv in a C program.

Child Process

int status = execv("/bin/ls", (char *[]) { "ls", "-l", NULL } );

/* If execv returns, something happened. */

If your Internet Protocol (IP) address is something like 192.168.1.x, chances are you are in a private network. RFC 1918 specifies a range of IP addresses for networks that are not directly exposed to the Internet. Typically these types of addresses employ Network Address Translation or NAT to route to the external Internet.

References

Address Allocation for Private Internets (RFC 1918)

@gkhays
gkhays / HWS Info.md
Last active March 5, 2020 17:21
HWS chatbot commands and services reference
@gkhays
gkhays / Empyrion Info.md
Last active March 26, 2020 15:51
Console commands and other helpful information

Empyrion Galactic Survival

Console Commands

  • gm - God mode
  • sbp - Spawn blueprints
  • im - Item menu
  • tt - Teleport
  • map - Show map ('map hide' to reverse)
  • sectors reveal
@gkhays
gkhays / Download File with Node.md
Created February 27, 2020 17:26
Download a file from a URL using Node.js

Download File from URL

Proof-of-concept to download a file from a URL and save it locally. For example, I may wish to retrieve a JAR file from Nexus.

Uses the http package, which does the basics with raw HTTP protocol support.

Possible update: use request, it is like the Python's requests library. There is a companion package called node-request-progress that tracks download progress. See request-progress on GitHub.

Note: The request package has been deprecated.