Skip to content

Instantly share code, notes, and snippets.

View hartsock's full-sized avatar
🤠
nvidian

Shawn Hartsock hartsock

🤠
nvidian
View GitHub Profile
@hartsock
hartsock / AbstractResource.java
Created February 18, 2016 15:32 — forked from knutwalker/AbstractResource.java
Jersey2 + Swagger with Resource inheritance
package com.example;
import com.wordnik.swagger.annotations.ApiParam;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
# How to create an RPM repository
# This is for Redhat 64 bit versions of Linux. You can create your own RPM repository # to host your custom RPM packages.
#
# See "How to create an RPM from source with spec file" for more information.
# https://gist.github.com/1376973
# Step: 1
# Install createrepo
@hartsock
hartsock / gist:9199a1382423fa46305d92d74b0d5838
Created August 14, 2019 16:42 — forked from devinodaniel/gist:8f9b8a4f31573f428f29ec0e884e6673
Generate SSH RSA Private/Public Key pair with Golang
// This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"golang.org/x/crypto/ssh"
@hartsock
hartsock / sshd.go
Created August 14, 2019 17:07 — forked from jpillora/sshd.go
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client: