V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wubaiqing
V2EX  ›  分享发现

[前端] 每日时报 - 2019.05.30

  •  
  •   wubaiqing · 2019-05-30 10:05:18 +08:00 · 959 次点击
    这是一个创建于 1800 天前的主题,其中的信息可能已经有所发展或是发生改变。

    [前端] 每日时报 - 2019.05.30

    https://github.com/wubaiqing/zaobao

    [视频] 利用 SocketIO 实时发送数据:https://www.youtube.com/watch?v=9HFwJ9hrmls

    [类库] slash 一致化处理路径中的分隔符:https://github.com/sindresorhus/slash

    [类库] TJ 写的命令行选项和参数解析器,支持子命令、选项校验、类型转换,帮助信息生成等等; API 非常的简单优雅:https://github.com/tj/commander.js

    [工具] 用命令行,显示 MacOS 信息如,内存、CPU ;和查看本机一致:https://github.com/obihann/archey-osx

    [工具] DevDash 是基于 Terminal 的仪表板,支持从 Github,Google Analytics 或 Google Search Console 中提取数据显示:https://github.com/Phantas0s/devdash

    配图 - DevDash 是基于 Terminal 的仪表板

    示例 - slash

    const path = require('path');
    const slash = require('slash');
    
    const string = path.join('foo', 'bar');
    // Unix    => foo/bar
    // Windows => foo\\bar
    
    slash(string);
    // Unix    => foo/bar
    // Windows => foo/bar
    

    示例 - commander

    const program = require('commander');
    
    program
      .option('-d, --debug', 'output extra debugging')
      .option('-s, --small', 'small pizza size')
      .option('-p, --pizza-type <type>', 'flavour of pizza');
    
    program.parse(process.argv);
    
    if (program.debug) console.log(program.opts());
    console.log('pizza details:');
    if (program.small) console.log('- small pizza size');
    if (program.pizzaType) console.log(`- ${program.pizzaType}`);
    

    示例 - 用命令行,显示 MacOS 信息

                     ###                  User: jhann
                   ####                   Hostname: obihann
                   ###                    Distro: OS X 10.10.5
           #######    #######             Kernel: Darwin
         ######################           Uptime:  6:11
        #####################             Shell: /bin/zsh
        ####################              Terminal: xterm-256color iTerm.app
        ####################              Packages: 114
        #####################             CPU: Intel Core i5-3210M CPU @ 2.50GHz
         ######################           Memory: 8 GB
          ####################            Disk: 95%
            ################              Battery: 100.00%
             ####     #####               IP Address: 24.222.18.26
    

    今日图 - 强大的原配气场

    查看更多 https://wubaiqing.github.io/zaobao/2019/05/30.html

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1348 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 17:00 · PVG 01:00 · LAX 10:00 · JFK 13:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.