Monthly Archives: October 2019

Ubuntu安装NodeJS

网上有很多Ubuntu安装NodeJS的教程,试了好几个,记录一下能work的:

### 安装NodeJS和npm1. v=10 # 这个会装nodejs 10,如果要用其他版本,改成对应版本号即可6,7,8,9等2. curl -sL https://deb.nodesource.com/setup_$v.x | sudo -E bash -3. sudo apt-get install -y nodejs

如果需要删除老的nodejs,可以先运行sudo apt-get purge nodejs npm。

NodeJS装完后可以用node -v和npm -v查看安装的版本

美国Avis租车被多收20美金的高速费

前2天吃午饭的时候听Yuqing童鞋说她出差的时候只走了一次高速,但是信用卡上被Avis多收了20美金。我突然想起前几个月去西雅图的时候也走了一次520高速,赶紧也查了一下信用卡账单,果不其然,也中招了。

我隐约记起租车的时候又提到e-tolls的服务,但是我提车的时候是没有选这个服务的。上网大概查了一下,Avis还真有这么一个条款:https://www.avis.com/en/products-and-services/services/avis-e-toll,里面的这句话解释了这个费用的原因:  You automatically opt into our e-Toll service program and will be charged $3.95 for each day of the entire rental period, including any days on which e-Toll is not used, up to a maximum of $19.75 per rental month, plus incurred tolls at the maximum prevailing rates posted by the toll authority. The charges may take 4-8 weeks after the rental to be billed to your credit card/debit card on file. 翻译过来说就是,只要用了一次eToll,整个租车期间每天都会被收3.95美金的费用,最高到19.75封顶。这个费用会在还车后4至8周从信用卡里扣除。

真是霸王条款啊,记录下来当个教训把。

另:eTolls收费的详情可以在这个网站查询。http://www.e-tolls.com/

WordPress文件上传大小限制解决方法

这2天把WordPress迁移到新服务器,用的是All-in-One WP Migration插件来搬家,但是搬迁过程遇到一个问题,新的WordPress网站建好了以后,导入备份文件总是失败在上传步骤,提示的错误信息是 超过2048KB错误。

网上的解决方法有非常多,不过还是试了很久才找到一个可以解决的方法,记录如下:

  1. 找到php.ini,如果找不到,可以建一个info.php文件,查看里面的 Configuration File (php.ini) Path 字段。
  2. 修改php.ini文件里的post_max_size和upload_max_filesize,默认值2M表示当前文件限制2MB。
比如我要导入的文件有100多MB了,我就把上传文件的大小限制改成200MB。
upload_max_filesize = 200M
post_max_size = 200M