This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
使用 wget 下载一个目录下的所有文件 | |
谁能看出标题配的图有什么问题?好吧,标题的图和本文没有任何关系! | |
今天想下载 MIT 的李代数课程笔记,参见网页:http://math.mit.edu/classes/18.745/Notes/. 突然间忘了 wget 的用法,如果直接将上述 URL 作为 wget 的参数的话,只会下载 index.html 文件。上网搜了一下,发现需要用到以下参数,所以写此日志记录之. 我参考了以下网站 http://bmwieczorek.wordpress.com/2008/10/01/wget-recursively-download-all-files-from-certain-directory-listed-by-apache/ | |
基本上,只要: | |
wget -r -np -nH -R index.html http://url/including/files/you/want/to/download/ | |
解释一下各个参数的含义: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo: | |
cd /etc/yum.repos.d/ | |
vim nginx.repo | |
填写如下内容: | |
[nginx] | |
name=nginx repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="let's encrypt" enabled="true" stopProcessing="true"> | |
<match url="^.well-known/acme-challenge/.+$" /> | |
<action type="None" /> | |
</rule> | |
<rule name="Rewrite to example.com" enabled="true"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
路由器打开方法: | |
snmp-server community crm RO //crm为自定义的共同体名称,常用Public | |
snmp-server trap-source FastEthernet0/3/0 //监控的端口 | |
snmp-server host x.x.x.x crm //在哪台终端(公网地址x.x.x.x)上应用共同体 | |
snmp-server enable traps //启用snmp | |
交换机打开方法 | |
Switch(config)#snmp-server community public ro #设置只读字符串,public为团体名称,ro为只读 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Date: 2015/7/03 | |
# Created by 独自等待 | |
# 博客 http://www.waitalone.cn/ | |
import sys, os | |
from Crypto.Cipher import DES | |
def decode_char(c): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
需如下操作: | |
在注册表HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe下面增加以下String: | |
FaceName = Bitstream Vera Sans Mono | |
之后你再运行cmd.exe,字体就变成bitstream mono了! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
经常有人讨论ADSL下载速度的问题,有的说2M应该是2048/8=256K/秒,很早就想深究这个问题了,以下根据协议的具体工作来分析2048K的ADSL下载速度到底应该是多少? | |
MTU1480#(目前大多城域网采用IP上行,不再用ATM,VLAN信息占12,因此不是1492) | |
同步速率2048000 | |
DMT frame长度(byte)64#参考用,不必用来计算 | |
字节/秒256000#以上统计物理层的速率,单位是Bit,为了方便计算,转换成Byte | |
ATM信元数量/秒4830.188679#53字节/信元,ADSL采用ATM方式来传送数据 | |
有效信元字节/秒231849.0566#48字节/信元 | |
最大接收以太网侦数/秒154.3602241#以太网侦长度1502,拨号方式都是以太网封装数据的 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python 2.7.12 | |
python 3.5.2 | |
# 安装 Python 发布版本,dev包必须安装,很多用pip安装包都需要编译 | |
sudo apt-get install python2.7 python2.7-dev python3.5 python3.5-dev | |
# 很多pip安装的包都需要libssl和libevent编译环境 | |
sudo apt-get install build-essential libssl-dev libevent-dev libjpeg-dev libxml2-dev libxslt-dev | |
# install mysql & nginx | |
sudo apt-get install mysql-server nginx-extras |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This page updated : 2016-12-10 21:40 | |
Google Chrome Portable | |
reference: | |
Download Google Chrome Portable | |
http://portableapps.com/apps/internet/google_chrome_portable | |
Google Chrome (for Windows) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$conn= mysql_connect("localhost","root","") or die("connect failed"); | |
mysql_select_db("thinkz"); | |
$result= mysql_query("select * from TEST") or die(mysql_error()); | |
while ($myrow = mysql_fetch_row($result)) { | |
printf("%s __ %s __ %s __ %s <p>", $myrow[0], $myrow[1], $myrow[2], $myrow[3]); |