Skip to content

Instantly share code, notes, and snippets.

View gkhays's full-sized avatar

Garve Hays gkhays

View GitHub Profile

JSON Parsing in C#

In the past I have used Visual Studio for C# and .NET developement. This little project is used to create a simple .NET console program using Visual Studio Code. The goal is to confirm that for multiple value entries, the .NET parser will use the last entered value.

Getting Started

Use these instructions to get the project up and running.

Prerequisites

@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 .
@DucNgn
DucNgn / PowerlineForTerminal.md
Last active March 29, 2024 03:28
Powerline style for terminal OSX

Installing and configuring Powerline-style command line tools for developers (OSX)

Intro:

For every developer, terminal is their weapon, so why don't you customize it to become a powerful, and a beautiful weapon?

Powerline style refers to a terminal style that helps developer to keep track of their workflow easily, allows them to have perfect visual on current directories and new changes. It is also git recognizable, and failure detector that will help your development process becomes more interact and much faster.

In this guideline, I will introduce you with 2 smart shells: Zsh and Fishshell. Both are perfect for the development jobs due to its rich of resources, and user-friendly.

Note:

@bsara
bsara / git-ssh-auth-win-setup.md
Last active April 22, 2024 13:49
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/uname/) called .ssh.
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
  • .ssh/config
@olih
olih / jq-cheetsheet.md
Last active April 20, 2024 06:34
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@cgruber
cgruber / pom.xml
Last active September 11, 2017 12:08
Example enforcer rule to exclude commons-collections 3.2.1 from the build
<!-- Avoid the M.A.D. Gadget vulnerability in certain apache commons-collections versions -->
<project>
<!-- ... -->
<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals><goal>enforce</goal></goals>
@zlorb
zlorb / linux_fun.md
Last active April 12, 2024 22:40 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Install figlet [3] via : sudo apt-get install figlet
  4. Make sure you have Ruby installed via : ruby -v
  5. Install the lolcat [2] via : gem gem install lolcat
  6. (option) Add to .bash_profile and/or .bashrc
@gkhays
gkhays / PasswordMask.java
Last active January 6, 2022 07:13
How to mask a password when input from the console. Contains a work-around for running within Eclipse; see Eclipse bug #122429.
package org.gkh;
import java.io.BufferedReader;
import java.io.Console;
import java.io.IOException;
import java.io.InputStreamReader;
public class ConsoleUtil {
/**
@gkhays
gkhays / osx-10.11-setup.md
Created October 27, 2015 20:03 — forked from kevinelliott/osx-10.11-setup.md
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.