Skip to content

Instantly share code, notes, and snippets.

@smothiki
smothiki / gist:4e9bbb2b7385eab1dab8db1ca777393c
Created September 23, 2019 23:00
install protoc in mac
brew install libtool
brew install autoconf && brew install automake
./autogen.sh && ./configure && make
make check
sudo make install
protoc --version
@smothiki
smothiki / 1_kubernetes_on_macOS.md
Created June 2, 2019 00:17 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

an be done, but not from a nice user interface.
I was playing around with the gparted Linux live partitioning distro. I had used this to re-arrange the partitions on my Linux VMWare image so it could be easily resized. This ISO is a hybrid and and doesn't mount from the finder. Here are some interesting commands. (All run from root)
hdiutil imageinfo gparted-live-0.25.0-3-i686.iso
Display all kinds of information about the image
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/dave/.ssh/identity
debug1: Offering public key: /Users/dave/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Trying private key: /Users/dave/.ssh/id_dsa
debug1: Next authentication method: password
[email protected]'s password:
@smothiki
smothiki / iptables cheatsheet
Created April 23, 2019 23:03
iptables cheatsheet
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
@smothiki
smothiki / Vagrantfile
Created April 10, 2019 22:10 — forked from garyachy/Vagrantfile
vagrant config for VirtualBox provider with serial port enabled
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "trusty64"
config.vm.network "private_network", ip: "192.168.50.4"
@smothiki
smothiki / virtualbox_ports.png
Created April 8, 2019 17:57 — forked from snb/virtualbox_ports.png
virtualbox serial console
virtualbox_ports.png
@smothiki
smothiki / vagrant
Created March 19, 2019 21:41
vagrant ova to vbox
Sometimes distribution providers (such as UCS) only give you VirtualBox .ova files to test their software. Here is how you can easily and non-interactively import a .ova file into a .box for use with Vagrant.
$ VBoxManage import ./UCS-Virtualbox-Demo-Image.ova --vsys 0 --eula accept
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/crohr/dev/ucs/./UCS-Virtualbox-Demo-Image.ova...
OK.
Disks: vmdisk1 53687091200 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized UCS-Demo-Image-virtualbox-disk1.v
./packer build -var-file=defaultvars.json -only=oracle-oci imagestemplate.json
2019/03/18 22:05:02 [INFO] Packer version: 1.4.0-dev
2019/03/18 22:05:02 Packer Target OS/Arch: darwin amd64
2019/03/18 22:05:02 Built with Go Version: go1.12
2019/03/18 22:05:02 Detected home directory from env var: /Users/simothik
2019/03/18 22:05:02 Using internal plugin for googlecompute
2019/03/18 22:05:02 Using internal plugin for null
2019/03/18 22:05:02 Using internal plugin for profitbricks
2019/03/18 22:05:02 Using internal plugin for scaleway
2019/03/18 22:05:02 Using internal plugin for triton