Mind your programming language-freeCodeCamp
https://medium.freecodecamp.org/mind-your-programming-language-38e340a430a1
About freeCodeCamp(a torchlight imogi)
Learn to code for free.
Join a supportive community of millions of coders.
Build projects and earn free certificates.
Get experience by coding for nonprofits.
As featured in :
WIRED, BUSINESS INSIDER, INC. lifehacker, TIME, QUARTZ
USA TODAY, THE NEW YORK TIMES, BBC
Launch your developer career
Meta Hirschl :
Through freeCodeCamp, I built a robust and highly functional web app for a nonprofit. This led me to getting a fantastic job.
Brian Grant :
freeCodeCamp is a great way for disabled veterans like me to retrain. I'm already receiving software engineering job offers.
Maxim Orlov :
I joined freeCodeCamp with zero knowledge of web development. 6 months later, I landed my first job as a back end engineer.
Learn powerful skills
HTML5, CSS3, JavaScript, Databases, Git & GitHub, Node.js, React.js, D3.js
( https://www.freecodecamp.org 에서 sign up 하면 테스트를 받을 수 있다.하지만 한번 시작하면 끝을 봐야하기 때문에(5분?) 여유를 가진 상태에서 시작해야한다. 테스트(힌트도 있다)를 통과하면, 사는 지역을 선택할 수 있고, 지역을 클릭하면 페이스북 그룹 홈페이지로 이동한다. )
Mar 27.
Ryan Davidson
How to use Github Linguist and gitatributes to detect your app's code type accurately
Some Github projects appear to be based on a different code type than they really are.
Github aims to detect and display the main programming language of your project reposusing its Linguist library. However, it sometimes reports a different code type for the project. This post will show you how to take control of this.
Github Linguist
Linguist aims to estimate the code type of a project by calculating percentages based on the bytes of code for each languge, then selecting the highest one as the language for your project.
A more-in depth explanation of this calculation can be read in the Linguist Readme.
One of the consequences can sometimes be that the largest code type can be reported based on imported libraries, or files that support the app but do not contain the most significant logic.
For example, in my project qr-code-pwa - A Javascript Progressive Web App that generates QR codes - Github Linguist initially reported it as a CSS project.
If the language reported is not as expected, you can override it using gitattributes. In short:
Create a
.gitattributes
file in the root of your projectIf you were creating a web app but the language containing the key logic is Javascript rather than HTML or CSS, you could add the following to it:
* linguist-vendored
*.js linguist-vendored=false
Push it to your repo
You should now see an updated project code type
How .gitattributes works
Linguist defines vendored code as libraries or improted files you didn't write. Setting files to linguist-vendored=false
in your .gitattributes
file tells the program that these are not imported library files, and that it should include them in its stats.
Use the linguist-vendored
attribute to vendor or un-vendor paths.
$ cat .gitattributes
special-vendored-path/* linguist-vendored
jquery.js linguist-vendored=false
It also allows you to specify that the language files should be marked as:
*.rb linguist-language=Java
And Whether to exclude files that should be considered documentation:
documented_code.rb linguist-documentation=true
Now your projects should display the correct programming language on Github.