zoukankan      html  css  js  c++  java
  • Github搜索技巧小结

    • 直接使用项目名称搜索或者需要使用高级搜索:https://github.com/search

    • 按照趋势搜索:https://github.com/trending

    • 按照热门搜索:https://github.com/topics

    转载链接:https://www.zhihu.com/question/20026151/answer/634179280

    指定搜索范围

    • octocat in:file 搜索文件中有octocat的代码
    • octocat in:path 搜索路径中有octocat的代码
    • octocat in:file,path 搜索路径中有octocat的代码或者文件中有octocat的代码
    • display language:sass 搜索用scss写的包含display的代码
    • Integer 搜索包含Integer的字段 搜索mozilla用户下用markdown写的代码

    通过语言搜索代码

    • element language:xml size:100 搜索大小为100字节的xml代码
    • user:mozilla language:markdown 搜索mozilla用户下用markdown写的代码

    通过fork的数量或者是否有父节点的方式搜索

    • android language:java fork:true 搜索用java写的 android相关的代码并且被fork过
    • function size:>10000 language:python 搜索与function相关的python代码,文件大小超过10kb

    按照目录结构搜索

    • console path:app/public language:javascript 在app/public directory目录下搜索console关键字
    • form path:cgi-bin language:perl 搜索cgi-bin目录下包含form的perl代码

    通过文件名搜索

    • filename:.vimrc commands 搜索 文件名匹配.vimrc 并且包含commands的代码
    • minitest filename:test_helper path:test language:ruby 在test目录中搜索包含minitest且文件名匹配"test_helper"的ruby代码

    根据扩展名来搜索代码

    • form path:cgi-bin extension:pm 搜索cgi-bin目录下以pm为扩展名的代码
    • icon size:>200000 extension:css 搜索超过200kb包含icon的css代码

    通过用户或者组织来查找

    • user:github extension:rb 查找github用户中以rb为扩展的代码
    • repo:mozilla/shumway extension:as搜索mozilla的shumway以as为扩展的代码

    根据star数搜索

    • react starts:>300搜索react相关的,且star数量大于300的项目

    要搜索代码片段,直接google:site:https://github.com + 功能名称(一般是人家的类名)

    github搜索技巧:https://segmentfault.com/a/1190000000475547

    转载自:https://www.zhihu.com/question/20026151/answer/634179280

  • 相关阅读:
    Java 反射 Class类
    Java 反射 Class对象
    Java 集合 ArrayList和LinkedList的几种循环遍历方式及性能对比分析 [ 转载 ]
    Kubernetes 删除 namespace
    Rancher在Catalog中 使用Helm Chart安装应用
    asp.net core + log4net+exceptionles+DI
    Jenkins-Kubernetes-docker-自动发布
    Asp.Net Core 2.0 WebUploader FastDfs 文件上传 分段上传
    Centos7 安装并配置redis
    redis 配置文件详解
  • 原文地址:https://www.cnblogs.com/zhizhi0810/p/14698903.html
Copyright © 2011-2022 走看看