原创 在Springboot使用FastJson解析Controller傳入參數
使用FastJson實現Springboot中的HandlerMethodArgumentResolver實現目的實現代碼FastJsonParseFastJsonArgumentResolverJSONObjectWrapper
原创 binutils工具包
ar strings strip nm readelf objdump ldd
原创 logrus在windows的terminal下彩色顯示
go version 1.8.3 windows/amd64 logrus version 1.0.2 // import this library import "github.com/shiena/ansicolor" i
原创 dpkg 依賴關係問題
sudo apt-get install -f -y
原创 判斷Golang中接口是否實現
判斷Golang中接口是否實現使用聲明變量的語法實現 使用聲明變量的語法實現 var _ 接口 = (*實現接口的結構)(nil) package main import "fmt" type A interface {
原创 shell腳本使用字符串操作報異常
腳本 #!/usr/bin/env sh a="a.b.c.d" echo ${a//./.} Bad substitution 原因 me@pc:~$ readlink -f $(which sh) /bin/dash
原创 使用nginx搭建簡單的文件服務器
1.學會安裝nginx 2.文件服務器的配置 server { client_max_body_size 4G; listen 82; ## listen for ipv4; this line
原创 Ubuntu Server下配置UTF-8中文/英文環境
安裝中文語言包 $ sudo apt-get install language-pack-zh 用vim配置語言環境變量 $ sudo vim /etc/environment 在下面添加如下兩行 LANG="zh_CN.UT
原创 Install or Updgrade Docker for Ubuntu
Install or Updgrade Docker for Ubuntu link Set up the repository $ sudo apt-get install apt-transport-https \
原创 《深入理解計算機系統》 圖7-9 重定位算法理解
重定位算法 foreach section s { foreach relocation entry r { refptr = s + r.offset; if (r.type == R_3
原创 Git 清理無效的遠程追蹤分支
在遠程版本庫創建了一個分支後,在本地可以使用 $ git remote update 可以在本地創建遠程追蹤分支, 但是,如果在遠程版本庫上刪除了某一分支,該命令並不會刪除本地的遠程追蹤分支, 這時候,有另一個命令 $ git
原创 linux使用cp複製文件到多個目錄
工具 cp awk find 實例 $ pwd /home/dev/tmp/d $ ls -R .: b p-f t-f ./p-f: hooks ./p-f/hooks: ./t-f: hooks ./t-f/h
原创 遷移gogs直接拷貝其gogs-repositories導致hook腳本中的相關路徑與實際不相符
問題 直接拷貝gogs-repositories導致項目中的hooks文件下的post-receive pre-receive update三個腳本中的調用路徑與實際不符,導致 remote: hooks/pre-receive:
原创 nginx用戶認證配置( Basic HTTP authentication)
生成密碼 $ htpasswd /file/conf/passwd <username> 配置 location / { auth_basic "File server login (size 6)";
原创 手動創建和掛載swap 分區
一、使用fdisk 在設備上創建swap分區。 1.創建分區 Command (m for help): n Command action l logical (5 or over) p primar