个人使用

做一个安静程序员,只希望自己在写作中有所提升。


  • 首页

  • 归档

  • 搜索

使用docker安装nginx(使用宿主机网络)

发表于 2019-05-04 | 更新于 2023-01-11

安装nginx步骤# 创建服务docker swarm init# 创建应用docker stack deploy -c docker-stack.yml <kuan-nginx># 列出与应用关联的服务docker services ls# 查看日志docker logs <service-id># 停止nginxdocker stack rm <kuan-ngin ...

阅读全文 »

Dockerfile文件简介

发表于 2019-05-04 | 更新于 2023-01-11

Dockerfile# 依赖镜像FROM <image> [AS <name>]# 备注LABEL <key>=<value> <key>=<value> <key>=<value> # 添加文件ADD hom* /workdir/ # 复制文件到容器# 复制文件COPY hom* /workdir/ ...

阅读全文 »

docker基础入门

发表于 2019-04-25 | 更新于 2023-01-11

常识Docker官网Docker CE:社区免费版, DOcker EE:企业收费版 CentOS 安装docker# 安装必要的一些系统工具sudo yum install -y yum-utils device-mapper-persistent-data lvm2# 添加软件源sudo yum-config-manager --add-repo http://mirrors.aliyun. ...

阅读全文 »

mac 把窗口移到另一个桌面,减少等到时间

发表于 2019-04-22 | 更新于 2023-01-11

拖动窗口,到屏幕边缘,停顿一秒,就会切换桌面。下边命令设置等待时间0.2秒defaults write com.apple.dock workspaces-edge-delay -float 0.2;killall Dock

阅读全文 »

nuxt在组件外部使用$router、$route、$store

发表于 2019-04-09 | 更新于 2023-01-11

nuxt在组件外部使用$router、$route、$store 有些业务需求,需要在客户端根据业务场景需要控制路由或者访问vuex store // 客户端根据接口返回条件重定向登陆aysnc function test () { // 判断是浏览器环境使用 if (typeof window === 'undefined') return ...

阅读全文 »

通过正则获取背景图片地址

发表于 2019-04-02 | 更新于 2023-01-11

function getBgUrls(str) { const reg = /url\((.*?)\)/gi return str .match(reg) .map(item => item.replace(/^url\(/, '').replace(/\)/, ''))}

阅读全文 »

mac电脑在terminal中打开vscode

发表于 2019-04-01 | 更新于 2023-01-11

文档地址 terminal中输入cat << EOF >> ~/.bash_profile# Add Visual Studio Code (code)export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"EOF 关闭terminal重新启动打开文件# 打开当前 ...

阅读全文 »

vue使用highlight.js

发表于 2019-04-01 | 更新于 2023-01-11

vue使用highlight.js<template> <div ref="code" class="code" v-html="html"></div></template><script>import hljs from 'highlight.js'import 'highlight.js/styles/androidstudio. ...

阅读全文 »

github访问速度很慢(mac)

发表于 2019-03-26 | 更新于 2023-01-11

公司和家里的电脑访问github一直很快,最近几天家里边的电脑访问速度很慢,速度一秒一k地速度,实在受不了。网上看到了这个修改host文件的方法很管用,github访问和下载速度变得很快简书 打开终端,编辑hosts文件sudo vim /etc/hosts 添加以下内容# github151.101.185.194 github.global.ssl.fastly.net192.30.253.1 ...

阅读全文 »

命令行中更好的使用git log

发表于 2019-03-26 | 更新于 2023-01-11

命令行中更好的使用git loggit log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative 设置git log 别名代替上边命令# 设置之后通过 git l ...

阅读全文 »
1…678…19

卢忠宽

做一个安静程序员,只希望自己在写作中有所提升。
181 日志
GitHub E-Mail
© 2023 卢忠宽
友情链接:luzhongkuan.cn
豫ICP备17016583号-1