web
jickcai · 共 134 篇文章
ftp 配置
配置目录 /usr/local/proftp/etc/proftpd.passwd 配置文件 /usr/local/proftp/etc/proftpd.conf ServerName "ProFTPD" ServerType standalone DefaultServer on timesGMT off # Port 21 is the standard FTP port. Port 21 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writ…
2023-12-05 10:06 · web · 评论(0)
icoding go 环境
launch.json { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "test", "type": "go", "request": "launch", "mo…
2023-11-30 17:02 · 电脑技巧 · 评论(0)
Visual Studio Code
常用快捷键 批量注释 完成注释:首先用鼠标选中多行,然后先按Ctrl+k,再按下Ctrl+c首先用鼠标选中多行,然后先按Ctrl+k,再按下Ctrl+c 取消注释:首先用鼠标选中多行,然后先按Ctrl+k,再按下Ctrl+u用鼠标选中多行,然后先按Ctrl+k,再按下Ctrl+u (一) 代码格式化: 快捷键:shift + option + F (二)选中方法,跳进方法 快捷键:command + 鼠标左键 (三)选中方法进行查看方法实用位置 快捷键:command + d (四)剪切/张贴/复制 快捷键:command + x/c/v (五)打开文件 快捷键:command + p (六…
2023-11-29 10:11 · 电脑技巧 · 评论(0)
samba
1. 背景 忘记了qa236机器的samba密码。 2. 基本条件 root权限。 3. 安装 3.1 查看安装状况 rpm -qa | grep samba 3.2 安装 3.2.1 yum yum install samba samba-client samba-swat 3.2.2 手动 解决方案: 新开一个samba账户。 1.centos安装samba yum install samba samba-client samba-swat rpm -qa |grep samba #查看安装状况 /etc/init.d/smb restart #启动Samba服务器 service sm…
2023-11-29 10:04 · linux · 评论(0)
rsync
一、rsync 概述 rsync 是类 unix 系統下的数据镜像备份工具,一款支持快速完全备份和增量备份的工具,支持本地复制,远程同步等,类似于 scp 命令;rsync 命令在同步文件之前要先登录目标主机进行用户身份认证,认证过后才能进行数据同步,身份认证方式取决于所使用的协议类型,rsync 一般使用两种协议进行数据同步;ssh 协议 和 rsync 协议。 二、rsync 特性 能更新整个目录树和文件系統 有选择的保留符号链接、硬链接、文件属性、权限、设备、及时间等。 对于安装来说,无特殊权限要求。 对于多个文件来说,文件传输效率高。 能用 ssh 或自定义端口作为传输入口端口 三、…
2023-11-29 10:02 · sh · 评论(0)
spark 抽样
use sessiondb; set NUM_SAMPLE = 30; CREATE EXTERNAL TABLE task_samples ( date_str string, task_id string, review_type string, task_type string, score string, user_name string ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LOCATION "afs://dd.afs.baidu.com:9902/user/xx/sp-cbreview-task/samples/{DAT…
2023-11-29 09:58 · web · 评论(0)
awk 输出单引号
echo aaa | awk '{print "select * from A where name='\''TOM'\''"}' /home/work/text.txt | awk -F "\t" '{ id=$1 sql="update table set review_status=2,sub_type=92,batch_id='\'''\'' where sub_type=94 and id='\''"id"'\'';" print sql } <iframe style="display: none !important;" width="320" height="240"></i…
2023-11-29 09:55 · sh · 评论(0)
nginx反向代理
nginx作为web服务器一个重要的功能就是反向代理。 nginx反向代理的指令不需要新增额外的模块,默认自带proxy_pass指令,只需要修改配置文件就可以实现反向代理。 配置前的准备工作,后端跑apache服务的ip和端口,也就是说可以通过 http://ip:port 能访问到你的网站。 nginx 新增配置 upstream apachephp { server 11.101.115.192:8085; #Apache } server { listen 8185; server_name test.126.com; access_log “/home/users/env/log/…
2018-07-12 14:02 · linux · 评论(0)
curl 代理访问
curl -x 10.200.33.113:8443 -l -H "Content-type: application/json" -X POST -d '{"cinemaCode":"5101","sessionId":"460"}' http://test.api.cfilmcloud.cn/info/sessionseat -x : 代理服务器 -H: 表头协议 -d: 数据
2017-06-09 12:00 · linux · 评论(0)
PHP CURL 代理
<?php class Proxy_Http { //use agent private $agent = '';//代理 //get or post private $method = "GET"; //get data from where private $url; //parameters post private $postParam = array(); //referer private $referer; //超时 private $timeout = 30; //cookie private $cookie; // 是否直接输出数据,避免内存溢出 private $isDi…
2017-05-10 19:54 · php · 评论(0)
shell date 日期转换
shell date 日期转换 date参数说明 -d, --date=STRING 显示字符串指定的时间,并非当前时间 其他参数通过下面的实例就可以看出其用法了 比如:%Y 2010 (年份,四位) %m 月份 %d 日期 +%Y-%m-%d 相当与%F %H:%M:%S 时(24小时格式):分:秒,相当与%T %I:%M:%S 时(12小时格式):分:秒 其他还有很多参数,可以man date查看。 sh文件中赋值: d=`date -d "2015-11-26" +%Y年%m月%d日` echo $d # echo $LANG en_US # date -d "2010-11-01 0…
2015-11-26 14:26 · sh · 评论(0)
strace -p 查看PHP 执行
1. 查找进程 ps aux | grep 'php' www 8794 0.0 0.0 281860 9440 ? S Jun18 0:00 php-fpm: 2. 监控 strace -p 8794
2014-06-19 09:45 · php · 评论(0)
python 取日期
#!/usr/bin/env python #2天前 ctime = time.strftime('%Y%m%d',time.localtime(time.time()-2*24*60*60)) print ctime #1天前 ctime = time.strftime('%Y%m%d',time.localtime(time.time()-1*24*60*60)) print ctime #当天 ctime = time.strftime('%Y%m%d',time.localtime(time.time())) print ctime
2014-01-02 11:11 · python · 评论(0)
rsync 同步服务器文件
rsync 同步服务器文件 信息: 日志接收地址: r2.data.com.cn 日志接收模块: articles 模块认证用户: user 认证用户密码: abc 其中 chmod 600 pass.txt 示例: rsync -vuzrtopg --password-file=/usr/home/tag/pass.txt --progress user@r2.data.com.cn::articles /usr/home/tag/tmp
2013-12-24 15:46 · linux · 评论(0)