Skip to content

Instantly share code, notes, and snippets.

@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
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y http://ftp.riken.jp/Linux/cern/centos/7/extras/x86_64/Packages/container-selinux-2.9-4.el7.noarch.rpm
yum install docker-ce
Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0
Authors: [email protected], [email protected] [email protected], [email protected]
# Building Kubernetes from Source in Minutes
In this repo you'll find instructions for building kubernetes (k8s) from source in minutes.
You will start a GCP VM, install kubernetes (k8s) build and runtime dependencies, then build k8s from source. Afterward, we'll startup the local build and verify its working.
#!/bin/sh
# Generate test coverage statistics for Go packages.
#
# Works around the fact that `go test -coverprofile` currently does not work
# with multiple packages, see https://code.google.com/p/go/issues/detail?id=6909
#
# Usage: script/coverage [--html|--coveralls]
#
# --html Additionally create HTML report and open it in browser
# --coveralls Push coverage statistics to coveralls.io
@smothiki
smothiki / readme.md
Last active October 9, 2017 21:08
weebly docs

File Sharing App weebly trial week project.

  • basic requirement are that a User can upload, Update, Share and delete files.

User Model

type User struct {
	UserID   string   `json:"user_id"`
	PassWord string   `json:"password"`