首页
留言板
关于我们
友情链接
Search
1
用闲置手机搭建本地WEB环境+ngrok内网穿透实现外网访问
48,675 阅读
2
小米8安装Google Play服务套件
31,679 阅读
3
单机斗地主不联网绿色版,适合老年人玩
24,481 阅读
4
世界上224个国家的中英文名称
22,048 阅读
5
Emlog,wordpress,typecho文章,百度是否已收录检测代码
16,826 阅读
默认分类
源码教程
生活随笔
代码笔记
登录
Search
标签搜索
SSL
vps
CentOS
AppNode
内网穿透
Node.js
发卡
GitHub
python
Google Voice
本地环境
Linux面板
Google Play
MarkDown
Vue
yarn
小商店
小程序
远程桌面
frp
www.9ywk.com
累计撰写
74
篇文章
累计收到
64
条评论
首页
栏目
默认分类
源码教程
生活随笔
代码笔记
页面
留言板
关于我们
友情链接
搜索到
13
篇与
的结果
2021-02-04
记录下Docker安装记录
官方一键安装脚本!Linux系统都支持!常用命令: https://www.9ywk.com/368.htmlcurl -sSL https://get.docker.com/ | sh curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun #启动 systemctl start docker #自启 systemctl enable dockerPortainer面版 中文汉化创建目录mkdir -p /data/portainer/data /data/portainer/public cd /data/portainer下载wget https://d.ttit.win/linux/public.zip解压至publicunzip public.zip启动docker run -d --restart=always --name portainer -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v /data/portainer/data:/data -v /data/portainer/public:/public portainer/portainer:latest通过ip:9000 初始化配置docker-composecurl -L https://github.com/docker/compose/releases/download/1.29.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose1.29.1 为docker-compose的版本号,更多版本可参考 https://github.com/docker/compose/releases 判断是否安装成功docker-compose version开机启动如果想让docker-compose容器开机自启动,需要建一个启动脚本新建一个 docker-compose-start.sh 脚本脚本内容为docker-compose -f /export/docker/docker-compose-nginx.yml up -d-f /export/docker/docker-compose-nginx.yml 是指定docker-compose的配置文件将写好的脚本(.sh)放到目录 /etc/profile.d/ 下,系统启动后就会自动执行该目录下的所有shell脚本。卸载# 查询安装过的包 [root@ ~]# yum list installed | grep docker docker-ce-cli.x86_64 1:20.10.2-3.el7 @docker-ce-stable #卸载 docker-ce-cli.x86_64 [root@ ~]# yum -y remove docker-ce-cli.x86_64最后删除容器镜像等rm -rf /var/lib/docker拉取镜像太慢?Docker Hub 是我们分发和获取 Docker 镜像的中心,由于服务器位于海外,经常会出现拉取/上传镜像时速度太慢或无法访问的情况。国内一些镜像源:科技大学:https://docker.mirrors.ustc.edu.cn 网易云:https://hub-mirror.c.163.com 百度云:https://mirror.baidubce.com DaoCloud:http://f1361db2.m.daocloud.io 阿里云:https://ustc-edu-cn.mirror.aliyuncs.com Github:https://ghcr.io1.编辑 /etc/docker/daemon.json 配置文件 vim /etc/docker/daemon.json 文件不存在会自动创建添加镜像源(可根据实际需要设置多个):{ "registry-mirrors": [ "https://docker.mirrors.ustc.edu.cn", "https://hub-mirror.c.163.com" ] } 2.重启 Docker 服务 service docker restart
2021年02月04日
997 阅读
0 评论
2 点赞
2020-12-20
Windows安装Python
Python安装https://www.python.org官网下载Python程序进行安装,将下方的两个选项框都打钩,再点击Customize installation进入下一步Add Python .. to PATH #添加环境变量将Install for all users选项打钩,其他的选项保持默认即可,点击Browse,根据自己的需求选择安装目录,点击Install进行安装部分命令CMD窗口执行python -V 查看版本where python 查看安装位置pip list 或者pip freeze 查看已安装的库pip uninstall 库名 卸载已安装的库pip list --outdated 查看可更新的第三方库pip install --upgrade 库名 更新库如出现不是内部或外部命令...看下系统变量是否添加进去,一般会自动添加系统变量路径:我的电脑-属性-高级系统设置-环境变量-系统变量-Pathpip 安装库时速度很慢?我们安装的库都是从国外的源下载,有时候线路及其他原因下载只有几十kb/s,我们可以将源切换到国内来进行下载。常用的pip国内源:阿里云 https://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) https://pypi.douban.com/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple/使用时加上 -i参数例如:pip install 库名 -i https://mirrors.aliyun.com/pypi/simple/
2020年12月20日
1,092 阅读
0 评论
0 点赞
2020-09-16
PC端悬浮图片广告代码带关闭按钮
javascript<script> function turnoff(obj){ document.getElementById(obj).style.display="none"; } </script>style.css.leftpop{ position: fixed; z-index: 99; left: 10px; bottom: 10px;} .leftpop .box{ -webkit-animation: rotate 0.4s linear alternate infinite; animation: rotate 0.4s linear alternate infinite;} .leftpop .close-btn{ position: absolute; z-index: 1; top: -5px; right: -5px; width: 20px; height: 20px; line-height: 18px; text-align: center; border-radius: 50%; background-color: rgba(0,0,0,.5); color: #fff;} @-webkit-keyframes rotate { 0% { transform: rotate(-5deg); } 50% { transform: rotate(0deg); } 100% { transform: rotate(5deg);; }} @media screen and (max-width: 1221px) { .wapnone{display:none; } }Code<div class="leftpop wapnone" id="xfad"> <a class="close-btn" href="javascript:;" onclick="javascript:turnoff('xfad')"><i class="fa fa-remove"></i></a> <div class="box"> <a href="https://www.9ywk.com" target="_blank"><img src="https://i.w3tt.com/2020/09/16/obHTl.png"></a> </div> </div>HTML完整代码<!doctype html> <html> <head> <meta charset="utf-8"> <title>悬浮广告</title> <link href="./css" rel="stylesheet" type="text/css"/> <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> <script> function turnoff(obj){ document.getElementById(obj).style.display="none"; } </script> </head> <body> <div class="leftpop wapnone" id="xfad"> <a class="close-btn" href="javascript:;" onclick="javascript:turnoff('xfad')"><i class="fa fa-remove"></i></a> <div class="box"> <a href="https://www.9ywk.com/" target="_blank"><img src="img"></a> </div> </div> </body> </html>
2020年09月16日
1,687 阅读
4 评论
0 点赞
2020-08-19
记录下Node.js/vue/yarn安装
Linuxnode.js npm# 下载 wget https://nodejs.org/dist/v14.15.3/node-v14.15.3-linux-x64.tar.xz # 解压 tar xf node-v14.15.3-linux-x64.tar.xz # 进入目录 cd node-v14.15.3-linux-x64 # 建立软连接,全局生效 ln -s /root/node-v14.15.3-linux-x64/bin/npm /usr/local/bin/npm ln -s /root/node-v14.15.3-linux-x64/bin/node /usr/local/bin/node node -v #版本查询 npm -v #版本查询 which npm # whereis npm npm安装目录创建了软链接可不配置环境变量vim /etc/profile添加到底部export PATH=$PATH:/root/node-v14.15.3-linux-x64/bin刷新配置,立即生效source /etc/profileyarn# 安装 npm install -g yarn # 创建软链接.全局生效 ln -s /root/node-v14.15.3-linux-x64/bin/yarn /usr/local/bin/ # 版本查询 yarn -v # 安装位置 which yarn # whereis yarnPM2# 安装.npm和yarn二选一 npm install -g pm2 yarn global add pm2 ##如不知道安装位置在哪里,可以看安装流程 # 创建软链接.全局生效 ln -s /root/node-v14.15.3-linux-x64/bin/pm2 /usr/local/bin/ # 版本查询 pm2 -v # 安装位置 which pm2 # whereis pm2 # 启动进程 pm2 start server.js # 查看进程 pm2 listWindowsNode.js官网下载开始安装,一直点next即可注意: 勾选下安装必要的工具Automatically install the necessary tools. Note that this will also install Chocolatey. The script will pop-up in a new window after the installation completes.安装完成后CMD窗口执行node -v 查看node版本npm -v 查看npm版本npm install -g npm npm更新如出现不是内部或外部命令...看下系统变量是否添加进去,一般会自动添加系统变量路径:我的电脑-属性-高级系统设置-环境变量-系统变量-Pathvue脚手架官网:Vue CLI全局安装vue-cil,也就是所谓的脚手架,前提是已经安装好了node.js安装npm install -g @vue/cli # or yarn global add @vue/cli问题1如执行命令:一直停在fetchMetadata: sill resolveWithNewModule...查看node源:npm config get registry切换淘宝的源npm config set registry https://registry.npm.taobao.org问题2安装报错npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli npm WARN deprecated request@2.88.2: request has been..... ...或其他报错,看下原因尝试:清除缓存.卸载.重新安装即可清除缓存 npm cache clean --force 卸载旧版本 npm uninstall -g @vue/cli # or yarn global remove vue-cli升级npm update -g @vue/cli # or yarn global upgrade --latest @vue/cli查看版本vue -V # or vue --version安装成功'vue' 不是内部或外部命令?配置下系统变量C:\***\node_global\yarn官网下载安装前需先安装Node.js还是一样,一直点next即可安装完成后CMD窗口执行下npm install -g yarn校验是否安装成功重新进入CMD查看yarn版本yarn -v
2020年08月19日
2,261 阅读
1 评论
0 点赞
2020-07-27
PHP解析MarkDown
ParsedownGitHub:Parsedown第一种方式<?php include 'Parsedown.php'; //引入解析 function md2html($title, $file) { echo '<!doctype html>'; echo '<html>'; echo '<head>'; echo '<meta charset = "utf-8">'; echo '<title>'.$title.'</title>'; echo '</head>'; echo '<body>'; $parser = new Parsedown(); $markdown = file_get_contents($file); echo $parser->text($markdown); echo '</body>'; echo '</html>'; } md2html('这是标题', '1.md'); //标题和MD文件 ?>第二种方式<?php require_once "Parsedown.php"; //引入解析 $Parsedown = new Parsedown(); echo '<meta charset="utf-8">'; echo $Parsedown->text('www.9ywk.com <br/> > Parsedown # 一级标题 ## 二级标题 ### 三级标题 #### 四级标题 ##### 五级标题 ###### 六级标题 '); ?>Marked.jsGitHub:Marked.js<!doctype html> <html> <head> <meta charset="utf-8"/> <title>Marked in the browser</title> </head> <body> <div id="content"></div> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script> document.getElementById('content').innerHTML = marked('# 一级\n\第二行 **加粗**\n\### marked.min.js'); </script> </body> </html>Parsedown 自用<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jiuyueidc/9ywk_com@web/Markdown/markdown.css"> </head> <body> <div class="wonderpen-page fixed-width"> <div id="wonderpen-content" class="wonderpen-content"> <div class="markdown-body align-null"> <?php include 'Parsedown.php'; function md2html($title, $file) { echo '<!doctype html>'; echo '<html>'; echo '<head>'; echo '<meta charset = "utf-8">'; echo '<title>'.$title.'</title>'; echo '</head>'; echo '<body>'; $parser = new Parsedown(); $markdown = file_get_contents($file); echo $parser->text($markdown); echo '</body>'; echo '</html>'; } md2html('title', 'url.md'); ?> </div> </div> </div> <script type="text/javascript"> //外链target=_blank function add() { var all_a = document.getElementsByTagName("a"); host_url=window.location.host; for (var i = 0; i < all_a.length; i++) { var domain = all_a[i].href.split("/"); //以“/”进行分割 if (domain[2]!=host_url) { all_a[i].target = "_blank"; } } } add(); </script> <center><h1> <a href="/">Doc list</a> </h1></center> </body> </html>
2020年07月27日
2,127 阅读
3 评论
0 点赞
1
2
//