Skip to content

Instantly share code, notes, and snippets.

View blanklin030's full-sized avatar
💭
I may be slow to respond.

BlankLin blanklin030

💭
I may be slow to respond.
  • baidu
  • china
View GitHub Profile
@blanklin030
blanklin030 / zsh_install.sh
Created April 17, 2020 07:08
zsh_install
#!/bin/sh
#
# This script should be run via curl:
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# or wget:
# sh -c "$(wget -qO- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#
# As an alternative, you can first download the install script and run it afterwards:
# wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
# sh install.sh
@blanklin030
blanklin030 / brew_install.sh
Last active June 22, 2020 08:57
brew_install.sh
#!/bin/bash
set -u
# First check if the OS is Linux.
if [[ "$(uname)" = "Linux" ]]; then
HOMEBREW_ON_LINUX=1
fi
# On macOS, this script installs to /usr/local only.
# On Linux, it installs to /home/linuxbrew/.linuxbrew if you have sudo access
@blanklin030
blanklin030 / mysql.md
Last active October 25, 2019 06:48
mysql常用engine的区别

create table test( id int(10) not null AUTO_INCREMENT,name varchar(3), PRIMARY KEY(id), UNIQUE KEY uqe_name(name) ) engine=innodb charset=utf8;
INSERT INTO test (id, name) VALUES (1, 'aa'), (2, 'bb'), (3, 'cc');

myisam索引

非聚集索引,索引和记录是分开存放的

@blanklin030
blanklin030 / prototype.md
Last active October 21, 2019 07:57
prototype原型相关

prototype

标识原型,对象通过原型可挂载到类上(继承)

function Obj(param) {
  this.a = param
}
Obj.prototype.print = function() {
  console.log(this.a)
}
@blanklin030
blanklin030 / create.md
Created September 5, 2019 08:40
Object.create的用法
<script type="text/javascript">
const a = {a:1}
console.log(a)
console.log("===================")
const b = Object.create(null,{
	a: {
		writable:true,
		configurable:true,
 value: 2
@blanklin030
blanklin030 / apply.md
Last active September 5, 2019 08:39
call、Apply、Bind用法
<script>
var obj = {
	"name": "hello"
}
function test(a,b,c) {
	console.log(this.name)
	console.log(a,b,c)
}
test.call(obj,1,2,3)
@blanklin030
blanklin030 / install_go.md
Last active December 20, 2018 09:22
install go at mac os

install go

download from this url:https://golang.org/dl/

check if install success

go version
ll /usr/local/go

set config

vim ~/.bash_profile

@blanklin030
blanklin030 / install_hadoop2.6.md
Created October 17, 2018 03:50
centos7下安装Hadoop2.6

centos7下安装Hadoop2.6

  • 假设当前有三台机器,分别是
  • 192.168.33.100 hadoop-master
  • 192.168.33.200 hadoop-slave01
  • 192.168.33.300 hadoop-slave02

配置系统环境

3台机器均要做以下操作

  • 配置host
@blanklin030
blanklin030 / http.md
Last active September 19, 2018 09:34
http请求参数之:query string parameters 与 form data 与 request payload的区别

http请求报头

Query String Parameters

// General
Request URL: http://foo.com?x=1&y=2
Request Method: GET

// Query String Parameters
x=1&y=2
@blanklin030
blanklin030 / install_nginx.sh
Last active October 30, 2018 04:15
自动安装nginx
#nginx的gzip模块需要zlib库,rewrite模块需要pcre库,ssl模块需要openssl库,查看程序是否已安装:
rpm -q pcre
rpm -q openssl
rpm -q zlib
rpm -q nginx
#!/usr/bin/env bash
#创建用户和组
echo "======创建用户和组======"
/usr/sbin/groupadd -f www