- 博客(22)
- 收藏
- 关注
原创 expect简单应用
expect用来实现简单的输入密码验证,在检测到password字符的时候进行输入. 通过这个原理可以实现更复杂的自动化,此处只是进行最简单的实验 写脚本运行,第一行,没有就安装#!/usr/bin/expect设置变量set port xxxxxset user xxxxxset passed xxxxxset host xxx.xxx.xxx.xxxset remote_file "
2017-11-22 10:14:27
281
原创 关于nginx的一点记录
以后找起来麻烦,记一下 记录一些命令nginx配置文件的位置 /etc/nginx/sites-available/defaulthosts文件位置 /ect/hosts修改配置文件后重启 service nginx reload修改php配置文件后重启 service php7.0-fpm reload用nginx代替hexo servernginx用来做phpmyadmin的服务器,这
2017-11-22 10:12:24
434
原创 Hexo网站的恢复策略
起因在hexo deploy的时候,只提交public目录下的文件(这是个错误的认识,下文将解释).但是整个hexo项目的配置文件等关键文件还留在本地, 若网站发生一些错误配置,但没有记录配置的过程,造成的后果是不可逆的,于是要备份整个仓库原本的思路是,在hexo的根目录下git init,将根目录设置为一个git项目,在每次deploy的时候执行git push,项目就被保存在了另一个仓库,项
2017-11-22 10:10:14
2474
原创 Java Web MVC简单实现
准备(摘录自百度百科)servlet容器基本概念: Tomcat是Servlet的运行环境,即一个Servlet容器。 Servlet容器的作用是负责处理客户请求,当客户请求来到时,Servlet容器获取请求,然后调用某个Servlet,并把Servlet的执行结果返回给客户. Servlet容器的工作过程是:当客户请求某个资源时,Servlet容器使用ServletRequest对象把客
2017-05-14 08:00:30
481
原创 使用TLP不能挂载优盘的解决方法
描述TLP brings you the benefits of advanced power management for Linux without the need to understand every technical detail. TLP comes with a default configuration already optimized for battery life, s
2017-04-25 22:30:59
485
原创 JDBC浅析
JDBC介绍百度百科关于JDBC的介绍JDBC常用接口和类interface DriverThe interface that every driver class must implement.这是每个驱动类都必须实现的接口以SQLlite为例,public class org.sqlite.JDBC implements java.sql.Driver实现该接口Class.forNa
2017-04-25 22:29:12
344
转载 ~/.vimrc配置
filetype offset rtp+=~/.vim/bundle/vundle/call vundle#rc()Bundle 'gmarik/vundle'"Bundle 'davidhalter/jedi-vim'Bundle 'Valloric/YouCompleteMe'filetype plugin indent onset nuset ts=4set expandtab
2017-02-10 10:17:25
346
转载 豆瓣pip源
新建~/.pip/pip.conf并添加[global]timeout = 6000index-url = http://pypi.douban.com/simple/[install]use-mirrors = truemirrors = http://pypi.douban.com/simple/trusted-host = pypi.douban.com
2017-02-10 10:11:43
373
转载 cpu模式调整
sudo cpufreq-info如果只有performance和powersave两种模式则可能是由于默认的intel_pstate驱动造成可关闭该驱动修改sudo vim /etc/default/grub将GRUB_CMDLINE_LINUX_DEFAULT="quiet"改为GRUB_CMDLINE_LINUX_DEFAULT=intel_p
2017-01-01 19:41:16
1860
转载 Linux压缩解压缩命令
tar命令 解包:tar zxvf FileName.tar 打包:tar czvf FileName.tar DirNamegz命令 解压1:gunzip FileName.gz 解压2:gzip -d FileName.gz 压缩:gzip FileName .tar.gz 和 .tgz 解压:tar zxvf Fi
2017-01-01 19:39:18
397
转载 network interface配置网络
修改文件/etc/network/interfaces为allow-hotplug eth0iface eth0 inet dhcpallow-hotplug wlan0iface wlan0 inet dhcp修改后执行,链接wifisudo ifup wlan0
2017-01-01 19:37:13
2488
转载 Linux清除已经删除文件的配置文件
dpkg -l |grep "^rc"|awk '{print $2}' |xargs aptitude -y purge
2017-01-01 19:35:35
1172
原创 Your PHP installation appears to be missing the MySQL extension which is require
安装php5-mysql重启apache2和mysql服务
2017-01-01 19:34:46
1058
转载 PowerTOP省电优化
安装powertopsudo powertop –htmltouch tmp.txtgrep ‘echo’ powertop.html |sed ‘s/.*\(echo.*\);.*/\1/g’ > tmp.txttmp.txt里面的脚本复制到rc.local
2017-01-01 19:33:58
1116
转载 使用cat、tail、head组合
使用cat、tail、head组合1、查看最后1000行的数据cat filename | tail -n 10002、查看1000到3000行的数据cat filename | head -n 3000 | tail -n +10001、cat filename 打印文件所有内容2、tail -n 1000 打印文件最后1000行的数据3、tail -
2017-01-01 19:32:55
1333
转载 此电脑IP
/sbin/ifconfig $1 | grep “inet addr” | awk -F: ‘{print $2}’ | awk ‘{print $1}’
2017-01-01 10:58:09
940
原创 Fn+F3开关触摸板
人生的第一个脚本#!/bin/shtemp=`synclient -l | grep TouchpadOff | awk ‘{print $3}’`zero=0if test $temp = $zerothen`synclient TouchpadOff=1`else`synclient TouchpadOff=0`fi快捷键里设置Fn+F3执行
2017-01-01 10:56:48
685
原创 从Git上下载vim主题并安装
1.安装git//建议使用新力得(Synatpic)安装软件,并不知道下面的操作能不能直接装上sudo apt-get install git2.克隆到本地,url为你在Github上找到的文件位置,默认下载到当前文件夹,如果是直接打开终端会下载到/home/xx/git clone "url"3.移动到vim的主题文件夹,debian8.5安装的是vim74.在下载的文件里找到”themeNam
2016-09-04 22:07:26
1740
原创 debian中默认不存在sudo命令解决方法
1.使用su安装sudo$su#apt-get install sudo给账户设置管理员权限#vim /etc/sudoers添加一行,其中”username”替换为登陆账户的名称,输入时不加引号"username" ALL=(ALL) ALL
2016-09-04 21:44:14
27992
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人