Happydong's Blog

自我反思,时间管理,PHP,Linux,Python


  • 首页

  • 分类

  • 归档

  • 标签

  • 关于

Fastadmin框架使用问题记录

发表于 2019-12-23   |   分类于 ThinkPHP

点击新增按钮 不弹出页面 直接新打开一个tab页面

  1. 单个功能的处理
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    // index.js中新增下面代码
    index:function(){
    ...
    $('.btn-add').off("click").on('click',function(){
    Fast.api.addtabs($.fn.bootstrapTable.defaults.extend.add_url,'新增','fa fa-plus');
    return false;
    });
    // 为表格绑定事件
    Table.api.bindevent(table);
    }
阅读全文 »

Redis使用问题整理

发表于 2019-12-07   |   分类于 Linux

源码安装reids

  1. 在redis官方下载自己需要的redis源码
  2. 连接服务器通过wget下载到/usr/local/src/目录下
1
2
[root@local ~]# cd /usr/local/src/
[root@local src]# wget http://download.redis.io/releases/redis-5.0.7.tar.gz
  1. 解压
1
[root@lcoal src]# tar -zxvf redis-5.0.7.tar.gz
  1. 编译安装
1
2
3
4
5
6
7
8
9
10
11
12
[root@lcoal src]# cd redis-5.0.7
[root@lcoal redis-5.0.7]# make
// 如果出现‘make[3]: gcc:命令未找到'则还需要安装gcc,重新make'
// 安装到指定的目录
[root@lcoal redis-5.0.7]# make install PREFIX=/usr/local/redis
[root@lcoal redis-5.0.7]# mkdir -p /usr/local/redis/etc
// 把配置文件复制到安装目录
[root@lcoal redis-5.0.7]# cp redis.conf /usr/local/redis/etc
[root@lcoal redis-5.0.7]# cd /usr/local/redis
// 启动redis
[root@lcoal redis]# ./bin/redis-server
//redis 启动会占据控制台,编辑etc目录下的redis.cnf文件将daemonize no改为daemonize yes,即可把redis启动放在后台启动
阅读全文 »

Mysql使用--问题整理记录

发表于 2019-12-03   |   分类于 Mysql

mysql5.7的安装

  1. 官方下载地址
  2. mysql5.7的安装文档
    安装的主要部分命令
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    shell> groupadd mysql
    shell> useradd -r -g mysql -s /bin/false mysql
    shell> cd /usr/local
    shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
    shell> ln -s full-path-to-mysql-VERSION-OS mysql
    shell> cd mysql
    shell> mkdir mysql-files
    shell> chown mysql:mysql mysql-files
    shell> chmod 750 mysql-files
    shell> bin/mysqld --initialize --user=mysql
    shell> bin/mysql_ssl_rsa_setup
    shell> bin/mysqld_safe --user=mysql &
    # Next command is optional
    shell> cp support-files/mysql.server /etc/init.d/mysql.server
阅读全文 »

Mac终端连接linux服务器问题整理

发表于 2019-11-20   |   分类于 Linux

ssh连接服务器报错

错误信息提示
/etc/ssh/ssh_config/: line 50: Bad configuration option: serveraliveinterval30 /etc
处理办法
vim /etc/ssh/ssh_config 文件 注释掉响应的提示行参数,退出终端,重新进入即可

阅读全文 »

Git配置公钥不用输密码更新代码

发表于 2019-11-20   |   分类于 Git

Linux环境配置git ssh公钥问题

  • git 免密更新代码
    进入linux环境通过命令生成公钥私钥
1
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"

通过命令会在/root/.ssh/目录下生成公钥文件(id_rsa.pub)和私钥文件(id_rsa)

  • 如果您之前的是通过https://git@gitee.com/xxxx@xx.git 获取项目的,现在请更换本项目的.git/config文件中的url 更改为 git@gitee.com:xxxx@xx.git 这样就可以免密git pull 和 git push 了
    gitconfig.png
阅读全文 »

Python爬取NBA2017-2018赛季数据实战

发表于 2018-04-28   |   分类于 Python爬虫

爬取目标

  • 爬取NBA2017-2018赛季 球队的球赛数据
  • 并保存到.csv 文件中

难点

  • 经分析得知,要获取的数据是动态生产的,经过抓包得到目标链接
  • json格式数据提取的层级分析

缺点

  • 对比赛时间部分,分析不足,只是给出了具体年月,没有日期和具体几点
  • 代码方面优化不足
阅读全文 »

高效学习方法

发表于 2017-08-17   |   分类于 学习方法

导语:

这是在读斯科特·杨的《如何高效学习》书的读书笔记,希望对自己以后的学习生涯有所帮助!

Ⅰ. 不懂学习,注定一无所成

提醒我们无论是在上学时代还是职场工作中,都要注意方式方法,不能蛮干,要学习技巧,就如书中所讲

人进入社会后,混得好不好,能不能越来越值钱,最重要的其实是学习力。

阅读全文 »

我的Blog诞生记

发表于 2017-01-04   |   分类于 搭建博客

经过半天的努力终于搞定,基于hexo + github 的博客算是基本实现。

具体过程如下:

1.首先安装 git 和 node

自己动手查找网上好多资料的说。

2.注册github账户

创建空的repositories,项目名称必须是 【你的用户名】.github.io。

3.安装 Hexo

阅读全文 »

Hello World

发表于 2017-01-03

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

阅读全文 »
Happydong

Happydong

时间如梭,岁月如水,美好的就是当下!

9 日志
7 分类
19 标签
GitHub
© 2017 - 2019 Happydong
由 Hexo 强力驱动
主题 - NexT.Pisces