记录日常点点滴滴,欢迎来到我的小站。

0%

建立先仓库

点击github首页的右上角的十字,弹出下拉框选择 New Repository
在Repository name处填上仓库名称

下面一般默认Public,最好勾选Initialize this repository with a README ,这样就可以自动生成README文件。

阅读全文 »

先设置GitHub的user name和email

1
2
git config --global user.name "Git账号"
git config --global user.email "Git邮箱"

生成一个新的SSH密钥

打开 Git Bash,输入如下命令,然后连续按三个回车即可:

1
ssh-keygen -t rsa -C "your_email@example.com"
阅读全文 »

Hello Vue

安装方法 npm i -S vue

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Hello Vue</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!-- 指定vue管理内容区域,需要通过vue展示的内容都要放到找个元素中 通常我们也把它叫做边界 数据只在边界内部解析-->
<div id="app">{{msg}}</div>
<script src="/common/js/vue.js"></script>
<script>
var vm = new Vue({
//el:提供一个在页面上已存在的DOM元素作为Vue实例的挂载目标
el: '#app',
//Vue实例的数据对象,用于给View 提供数据
data: {
msg: "Hello Vue"
}
})
</script>
</body>
</html>

最近服务器更新了之后,PHP的版本自动升级到了。php7.0,
由于使用的插件等原因不支持高级版本的Wordpress,所以一直还在使用Wordpress 4.8.2的版本,
这回终于出问题了。
输入后台地址,一片白屏どうしよう

没办法,去wordpress根目录下, 修改wp-config.php

1
define('WP_DEBUG', true);
阅读全文 »

琢磨了两天总算知道怎么开启Ubuntu 20.04 的Root登录了。在这里分享给大家。

1. 为root创建密码

首先为root创建好密码,这样我们通过下面的操作才能顺利的进入系统。

1
sudo passwd root
阅读全文 »

根据客户的需求需要无缝301一个文件到另一个文件夹

参考了网上很多的示例,制作了下面的.htaccess文件,不正确的地方请大家指出

1
2
3
4
5
6
7
8
9
10
11
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^en/product/index.html$ https://www.ttwinbug.com/cplus/en/products/index.html [R=301,L]
RewriteRule ^en/product/$ https://www.ttwinbug.com/cplus/en/products/index.html [R=301,L]
RewriteRule ^id/product/index.html$ https://www.ttwinbug.com/cplus/id/products/index.html [R=301,L]
RewriteRule ^id/product/$ https://www.ttwinbug.com/cplus/id/products/index.html [R=301,L]
RewriteRule ^th/product/index.html$ https://www.ttwinbug.com/cplus/th/products/index.html [R=301,L]
RewriteRule ^th/product/$ https://www.ttwinbug.com/cplus/th/products/index.html [R=301,L]
RewriteRule ^vi/product/index.html$ https://www.ttwinbug.com/cplus/vi/products/index.html [R=301,L]
RewriteRule ^vi/product/$ https://www.ttwinbug.com/cplus/vi/products/index.html [R=301,L]
</IfModule>