1.窗口操作: 1.查看隐藏文件:shift+command+. 2.关闭隐藏文件:shift+command+. 3.前往任意文件夹:shift+command+G
Month: December 2017
百度音乐接口
百度音乐全接口 http://tingapi.ting.baidu.com/v1/restserver/ting 请求方式:GET 参数处理:format=json&calback=&from=webapp_music&method=以下不同的参数获得不同的数据 一、获取列表 例:method=baidu.ting.billboard.billList&type=1&size=10&offset=0 参数: type = 1-新歌榜,2-热歌榜,11-摇滚榜,12-爵士,16-流行,21-欧美金曲榜,22-经典老歌榜,23-情歌对唱榜,24-影视金曲榜,25-网络歌曲榜 size = 10 //返回条目数量 offset = 0 //获取偏移 二、搜索 例:method=baidu.ting.search.catalogSug&query=海阔天空 参数:query = ” //搜索关键字 三、播放 例:method=baidu.ting.song.play&songid=877578 例:method=baidu.ting.song.playAAC&songid=877578 参数:songid = 877578 //歌曲id 注:关于使用file_link不能播放的问题,是因为百度使用Http中的Referer头字段来防止盗链,在HTML文件中加上 <meta name=”referrer” content=”never”>这一句让发送出去的Http包都不含Referer字段就行了 四、lrc歌词 例:method=baidu.ting.song.lry&songid=877578 参数:songid = 877578 //歌曲id 五、推荐列表 例:method=baidu.ting.song.getRecommandSongList&song_id=877578&num=5 参数: song_id = 877578 num = 5//返回条目数量 六、下载 例:method=baidu.ting.song.downWeb&songid=877578&bit=24&_t=1393123213 参数: songid =…
国内优秀npm镜像推荐及使用
npm全称Node Package Manager,是node.js的模块依赖管理工具。由于npm的源在国外,所以国内用户使用起来各种不方便。下面整理出了一部分国内优秀的npm镜像资源,国内用户可以选择使用。 国内优秀npm镜像 淘宝npm镜像 搜索地址:http://npm.taobao.org/ registry地址:http://registry.npm.taobao.org/ cnpmjs镜像 搜索地址:http://cnpmjs.org/ registry地址:http://r.cnpmjs.org/ 如何使用 有很多方法来配置npm的registry地址,下面根据不同情境列出几种比较常用的方法。以淘宝npm镜像举例: 1.临时使用 npm –registry https://registry.npm.taobao.org install express 2.持久使用 npm config set registry https://registry.npm.taobao.org // 配置后可通过下面方式来验证是否成功 npm config get registry // 或 npm info express 3.通过cnpm使用 npm install -g cnpm –registry=https://registry.npm.taobao.org // 使用 cnpm install express