• 2020年1月6日13:21

    许式伟的架构课推荐书目


    2020年1月6日13:21 Alan
    Alan
  • 2019年12月19日17:19

    快速获取网站 Favicon:

    http://www.google.com/s2/favicons?domain=www.SITENAME.com


    2019年12月19日17:19 Alan
    Alan
  • 2019年12月13日11:06

    Nginx简单的User-Agent反爬

    #禁止Scrapy等工具的抓取
    if ($http_user_agent ~* (Scrapy|Curl|HttpClient)) {
         return 403;
    }
    #禁止指定UA及UA为空的访问
    if ($http_user_agent ~ "WinHttp|WebZIP|FetchURL|node-superagent|java/|FeedDemon|Jullo|JikeSpider|Indy Library|Alexa Toolbar|AskTbFXTV|AhrefsBot|CrawlDaddy|Java|Feedly|Apache-HttpAsyncClient|UniversalFeedParser|ApacheBench|Microsoft URL Control|Swiftbot|ZmEu|oBot|jaunty|Python-urllib|lightDeckReports Bot|YYSpider|DigExt|HttpClient|MJ12bot|heritrix|EasouSpider|Ezooms|BOT/0.1|YandexBot|FlightDeckReports|Linguee Bot|^$" ) {
         return 403;
    }
    #禁止非GET|HEAD|POST方式的抓取
    if ($request_method !~ ^(GET|HEAD|POST)$) {
        return 403;
    }

    其它链接: https://www.secpulse.com/archives/66483.html

    图片追踪及隐形水印服务:https://www.imatag.com/

    内容保护:https://www.dmca.com/


    2019年12月13日11:06 Alan
    Alan
  • 2019年11月5日13:14

    上传 .mov 文件所遇到的坑

    我们都知道 .mov 文件的 Mime Type 是 video/quicktype,但在进行前端校验时,有一台测试机器(Windows 10)中出现自定义文件中无法筛选出.mov 文件,且在 JS 中进行 Type 校验时断点发现所获取到的 type 值为空。

    解决方案

    1、type 校验问题

    打开注册表( 命令打开:regedit)然后在HKEY_CLASSES_ROOT下找到.mov,选中右击 新建>字符串值,添加

    名称:Content Type

    数据:video/quicktime

    重启电脑,此时会发现获取类型将不再存在问题

    原因分析:测试机器安装的 QQ 影音播放器覆盖了注册表中的设置

    2、自定义文件筛选问题

    在 input 标签的 accept 属性中添加一个对 .mov 后缀名的校验

    原因分析:H5的原生 Mime Type 类型支持是有一定限制的,不同浏览器的兼容性会不致,但具体原因尚无法得知

     


    2019年11月5日13:14 Alan
    Alan
  • 2019年10月19日12:40

    升级到macOS Catalina 遇到的坑

    1、找不到的文件请先查看/Users/Shared/Relocated\ Items/Security/

    2、RDC远程 Windows 工具无法使用

    3、PhotoShop “Save for web”闪退

    4、App Store 更新应用输入正确用户名、密码失败

    5、VLC 播放器存在画面静止不动等问题


    2019年10月19日12:40 Alan
    Alan
  • 2019年10月15日8:38

    这个广告给我的第一感受是毫无新意、也不存在什么吸引力。

    但是我错了,我小小的朋友圈竟然会有这么多人参加互动,包含程序员、设计师、销售等各种岗位,“Python”和“追上同龄人”可能是戳中很多人的点吧,要我说其实“每天”和“学习”才是重点。

    虽然我一直认为编程未来和现在大家用 Excel 或学英语并没有本质上的区别,但这种对广告的互动率还是让我觉得有些意外。

    Python 训练营


    2019年10月15日8:38 Alan
    Alan
  • 2019年9月24日11:34
    https://youtu.be/PFwUbgvpdaQ

    关于 SPA等应用的爬取,从这个视频中得到信息以及我自己的理解是:

    • URL 方面/#home和/#!home 已不再支持,应通过 history api 生成链接
    • Google 可以处理 Client rendering,但要等待有足够的爬虫资源,所以对于普通网站不太能依赖于这个
    • 另一种当然是SSR服务端渲染
    • 然后提出了一个Dynamic rendering,针对搜索引擎进行的预渲染,工具有puppeteer、rendertron
    • Googlebot使用Chrome 41,所以新 JS 语法是不能解析到的

    工具:

    • Fetch as google 和Mobile Usability: g.co/SearchConsole
    • Rich results test:bit.ly/richresults-test

    JavaScript 渲染


    2019年9月24日11:34 Alan
    Alan
  • 2019年6月18日22:14

    邓宁-克鲁格效应(Dunning-Kruger effect)

    邓宁-克鲁格效应


    2019年6月18日22:14 Alan
    Alan
  • 2019年5月31日10:37

    搜索小工具:https://github.com/super-l/superl-url

    自动搜索指定关键词指定页数的结果并存储到 MySQL上
    搜索小工具


    2019年5月31日10:37 Alan
    Alan
  • 2019年5月28日21:22
    SQLMongoDB
    DatabaseDatabase
    TableCollection
    IndexIndex
    RowDocument
    ColumnField
    JoinsEmbed in document or link via DBRef
    CREATE TABLE employee (name VARCHAR(100))db.createCollection("employee")
    INSERT INTO employees VALUES (Alex, 36)db.employees.insert({name: "Alex", age: 36})
    SELECT * FROM employeesdb.employees.find()
    SELECT * FROM employees LIMIT 1db.employees.findOne()
    SELECT DISTINCT name FROM employeesdb.employees.distinct("name")
    UPDATE employees SET age = 37 WHERE name = 'Alex'db.employees.update({name: "Alex"}, {$set: {age: 37}}, {multi: true})
    DELETE FROM employees WHERE name = 'Alex'db.employees.remove({name: "Alex"})
    CREATE INDEX ON employees (name ASC)db.employees.ensureIndex({name: 1})

     

    官方PDF: http://s3.amazonaws.com/info-mongodb-com/sql_to_mongo.pdf

    MySQL 转 Mongo: http://www.querymongo.com/


    2019年5月28日21:22 Alan
    Alan