Skip to content

Instantly share code, notes, and snippets.

View martin31821's full-sized avatar
:octocat:
Focusing

Martin Koppehel martin31821

:octocat:
Focusing
View GitHub Profile
@martin31821
martin31821 / gist:176d00d4fadd900d0257dd4a38998657
Created July 26, 2018 12:29 — 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"
@martin31821
martin31821 / update-hosts.sh
Created May 30, 2018 21:47 — forked from jamshid/update-hosts.sh
Docker environment hack, to put the names of running containers in /etc/hosts
#!/bin/bash
# An alternative to "links", run this script after starting or stopping any
# container. It's a hack to update the host machine (vagrant) /etc/hosts with
# the current active docker containers and tell dnsmasq to refresh.
#
# Then start each machine with "-dns ${DOCKER_HOST_IP}", e.g.
# $ docker run -d -name mycontainer1 -dns 10.0.3.1 MYPRODUCT
# You can't seem to set the DNS during "docker build".
#
# Diagnostic command to run in host or while logged into containers:
library IEEE;
use IEEE.std_logic_1164.all;
entity reg is
port (
clk : in std_logic;
i_port : in std_logic_vector(7 downto 0);
o_port : out std_logic_vector(7 downto 0)
);
end entity reg;