==========
== Soda ==
==========

go snippets

golang
检查map是否为空 1 2 3 if len(map) == 0 { .... } 时间复杂度: O(1) 参考: How to check if a map is empty in Golang? Preappend slice 1 2 3 4 5 6 x = append([]int{1}, x...) // 或 x = append(x, 0) copy(x[1:], x) x[0] = 1 参考:How to prepend Read more...

alpine虚拟机上安装nfs server

virtualbox alpine nfs
安装virtualbox 1 sudo pacman -S virtualbox virtualbox-host-modules-arch 如果碰到: 1 2 3 4 5 6 WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.13.12-1-ARCH) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to Read more...

科学上网

gfw
解决go get下载不了包的问题 1 https_proxy=socks5://127.0.0.1:3333 http_proxy=socks5://127.0.0.1:3333 ALL_PROXY=socks5://127.0.0.1:3333 go get -v github.com/mdempsky/gocode 1 2 3 4 # Enable the go modules feature export GO111MODULE=on # Set the GOPROXY environment variable export GOPROXY=https://goproxy.io

spring boot项目打包为docker image

spring-boot docker
19.05.20更新: pom文件更新为: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 <plugin> <groupId>com.spotify</groupId> <artifactId>dockerfile-maven-plugin</artifactId> <version>1.4.10</version> <configuration> <repository>com.myname.demo/demo1</repository> <outputDirectory>${project.build.directory}</outputDirectory> <contextDirectory>${project.basedir}</contextDirectory> <dockerfile>src/main/resources/docker/Dockerfile</dockerfile> <tag>v1</tag> <buildArgs> <JAR_FILE>${project.build.finalName}-myname.jar</JAR_FILE> </buildArgs> </configuration> <executions> <execution> <id>default</id> <goals> <goal>build</goal> <goal>push</goal> </goals> </execution> </executions> </plugin> 建议 Read more...

arch linux 安装配置笔记

arch-linux
采用 UEFI 模式 GPT 分区 安装准备 请参照 wiki,仅对省略处进行补充。 下载镜像 官方下载地址:https://archlinux.org/downloa Read more...

soda主题待办

hugo
bug: 首页分页数量和归档分页数量无法独立调整 优化: html和css中类名含有的-全部改为_ 代码折叠功能 i18n 归档按年 文章封面图 分享 回答问题才能评论 暗 Read more...
Previous Page 2 of 4 Next Page