我的心情
Zoho Creator Embed Form With Params
<div id="Search_Pro_Version" class="formstyle_embed" zc_mobileView='inline' elName='zc-component' formLinkName='Search_Pro_Version' params='zc_Header=false&zc_SuccMsg=Data Added Successfully!&zc_SubmitVal=Submit&zc_ResetVal=Reset&zc_Focus=false&Gender=<%=input.Gender%>&Inventory=<%=input.Inventory%>&Category=<%=input.Category%>&Collection=<%=input.Collection%>&Discount=<%=input.Discount%>&Color=<%=input.Color%>&Size=<%=input.Size%>&Article_No=<%=input.ArticleNo%>'>Loading Form...</div>
强制刷新Exchange动态组成员
# 更新动态邮件组属性以强制刷新 Set-DynamicDistributionGroup -Identity "YourDynamicTeamEmail" -Notes "Updated to refresh members" -ForceMembershipRefresh
centos安装字体
1、查看中文字体 fc-list :lang=zh 2、安装字体 yum -y install fontconfig #安装字体库 yum -y install ttmkfdir mkfontscale #安装字体索引信息 可拷贝Windows的字体目录:C:\Windows\Fonts 3、linux字体目录:/usr/share/fonts,建议创建一个目录mkdir chinese 放中文字体 4、把字体上传到/usr/share/fonts/chinese目录 5、然后在/usr/share/fonts/chinese执行命令,生成字库索引信息 mkfontscale mkfontdir 6、更新字体缓存 fc-cache
python requests 支持 socket 代理
让python requests 支持 socks5代理 requests support socket proxy
pip install —upgrade requests “requests[socks]”
import requests
requests.get("http://www.google.com", proxies={"http":"sock5://127.0.0.1:1080"})
或者
pip install requests-unixsocket
import requests_unixsocket as requests
requests.get("http://www.google.com", proxies={"http":"sock5://127.0.0.1:1080"})
React/Core error
grep -rl "s.dependency 'React/Core'" node_modules/ | xargs sed -i '' 's=React/Core=React-Core=g'
docker 启动容器遇到问题: cgroups: cannot find cgroup mount destination: unknown
解决办法: 1、执行Linux虚拟机。 2、执行 sudo mkdir /sys/fs/cgroup/systemd 3、执行 sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd 4、再次启动容器,如下图:
Solving Error response from daemon OCI runtime create failed container with id exists
Backup then: root@aaa ~> rm -rf /var/run/docker/runtime-runc/moby/* root@aaa ~> service docker stop root@aaa ~> reboot
问题发生 有两个闲置的容器在删除时发生错误,处在Removal In Progress状态。在重启Docker后处于Dead状态。 $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES cdcf0acae1af nginx:latest "nginx -g 'daemon of…" 6 months ago Removal In Progress webproxy c58e2a73f117 hexoblogs:latest "nginx -g 'daemon of…" 11 months ago Removal In Progress dhblogs 删除时提示信息如下: $ sudo docker rm webproxy Error response from daemon: driver "devicemapper" failed to remove root filesystem for cdcf0acae1afb7da7e57653945b7322e32bc6909444558ba6834612b8bfa5ebd: remove /mnt/docker/devicemapper/mnt/5faf8f2ec431bad0e1e2938330b2844209e864b1b76c857fea5f29b44a18999a: device or resource busy 网上有很多类似的解决办法,但试了几个均不能使用,例如: $ docker system prune $ find /var/lib/docker -name "*webproxy*" $ mount -l $ umount $ ... 最终解决方案: $ grep docker /proc/*/mountinfo | grep 5faf8f2ec431bad0e1e2938330b2844209e864b1b76c857fea5f29b44a18999a /proc/24762/mountinfo:145 143 252:5 / /mnt/docker/devicemapper/mnt/5faf8f2ec431bad0e1e2938330b2844209e864b1b76c857fea5f29b44a18999a rw,relatime shared:97 - xfs /dev/mapper/docker-253:17-15728997-5faf8f2ec431bad0e1e2938330b2844209e864b1b76c857fea5f29b44a18999a rw,nouuid,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota $ kill -9 24762 $ docker rm dhblogs dhblogs 说明:grep检索的不是容器号,而是删除时提示信息中/mnt/docker/devicemapper/mnt/*** 驱动器号,得到占用该驱动器的进程号 24762(/proc/24762/mountinfo),杀死进程即可
安装多个mysql
变异安装mysql: https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.30.tar.gz shell> mkdir bld shell> cd bld cmake .. -DMYSQL_TCP_PORT=3307 -DMYSQL_UNIX_ADDR=/var/run/mysqld/5.7/mysql.sock -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/5.7 -DMYSQL_DATADIR=/home/mysql5.7 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost shell> make shell> make install bin/mysqld --defaults-file=/etc/mysql/5.7/my.cnf --initialize --user=mysql =======start========= chown -R mysql:mysql /var/run/mysqld/5.7 /usr/local/mysql/5.7/bin/mysqld_safe --defaults-file=/etc/mysql/5.7/my.cnf /usr/local/mysql/5.7/bin/mysql -h127.0.0.1 -P 3307 -uroot -p ALTER USER 'root'@'localhost' IDENTIFIED BY 'root-password'; CREATE USER 'root'@'%' IDENTIFIED BY 'root-password'; grant all on *.* to 'root'@'%' with grant option;
----------------- ~# cat /etc/my.cnf [mysqld] user = mysql port = 3307 basedir = /usr/local/mysql/5.7 pid-file = /var/run/mysqld/5.7/mysqld.pid socket = /var/run/mysqld/5.7/mysqld.sock datadir = /var/lib/mysql/5.7 log-error = /var/log/mysql/error-5.7.log # By default we only accept connections from localhost #bind-address = 127.0.0.1 # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 query_cache_size=512M query_cache_type=1 key_buffer_size=256M innodb_buffer_pool_size=512M language = /usr/local/mysql/5.7/share/english sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
配置开机启动项
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld chmod +x /etc/init.d/mysqld chkconfig --add mysqld chkconfig mysqld on
爬虫网页
#nohup scrapy runspider spider.py > urls.log &
import scrapy
class MySpider(scrapy.Spider):
name = 'domain'
allowed_domains = ['domain']
start_urls = [
'https://domain/'
]
#avoid repeat
tempList = []
def parse(self, response):
# for h3 in response.xpath('//h3').getall():
# yield {"title": h3}
for link in response.xpath('//a/@href').getall():
if link not in self.tempList:
print(link)
self.tempList.append(link)
yield scrapy.Request(response.urljoin(link), self.parse)