Kubernetes Basics

Install

brew cask install minikube

brew install docker-machine-driver-hyperkit

brew install kubernetes-cli

Start Minikube cluster

minikube start --vm-driver=hyperkit

kubectl config use-context minikube

The --vm-driver=hyperkit flag specifies that you are using Docker for Mac.

View Kubernetes ......

设置Windows10和Ubuntu双启动

unetbootin制作ubuntu安装盘

BIOS禁用secure boot (禁用FAST BOOT; 删除secure boot中的PK key)

安装Ubuntu时,“安装类型”选择“其他选项”,进行磁盘分区(2G留给“保留BIOS启动区域”,32G留给swap,100G留给"/",其余留给"/home")

参考:

How to Disable or Enable Secure Boot on Your Computer via ASUS UEFI BIOS Utility

win10+ubuntu双系统配置

MongoDB Basics

Start mongo shell:

mongo

Common commands:

show dbs;

use db_foo;

show collections;

db.collection_foo.find();

Understand this in Javascript

this is used inside a function (let’s say function A) and it contains the value of the object that invokes function A.

this is not assigned a value until an object invokes the function where this is defined.

the object that invokes the this function is in context, and we can change the context by ......

在Mac上制作Windows10安装盘

步骤:

格式化优盘:格式MS-DOS(FAT),模式Master Boot Record

使用UNetbootin导入安装包

注意:

UEFI需要安装盘为FAT格式

FAT32支持单个文件的上限为4GB,但是UNetbootin会把安装包解压后导入,所以并不存在改问题

参考:

How to create a bootable Windows 10 USB on Mac

Redux的简单实现

VirtualBox配置CentOS7

下载CentOS7镜像

Download EverythingISO

安装CentOS7镜像

Memory: 6GB

Virtual hard disk: VDI, Dynamically allocated, 24GB

在安装过程中,安装类型选择"GNOME Desktop"

安装Guest Additions

Devices -> Insert Guest Additions CD Image...

Double click and "Run Software"

Reboot

无法访问网络的问题

Settings ......

使用淘宝NPM镜像

由于国内的网络原因,一些NPM的包无法通过默认的源进行下载。此时可以手动将安装源修改成淘宝的NPM镜像,方法如下:

npm config set registry="https://registry.npm.taobao.org"

Regression with Keras

Install XGBoost on Mac

brew install gcc@5

pip install xgboost

Reference:

Problems while installing in OSX 10.11.6?