What happens if you tell GitHub it's JSON
{
"hello": "world" // I want my comments!
}Use jsonc as the language instead
| { | |
| "7 Pot Brain Strain Red Pepper": "Capsicum chinense", | |
| "7 Pot Bubble Gum Pepper": "Capsicum chinense", | |
| "7 Pot Pepper Barrackpore": "Capsicum chinense", | |
| "7 Pot Pepper Brain Strain Yellow": "Capsicum chinense", | |
| "7 Pot Pepper Orange": "Capsicum chinense", | |
| "7 Pot Pepper Yellow": "Capsicum chinense", | |
| "7 Pot Pink Pepper": "Capsicum chinense", | |
| "7 Pot Rust Pepper": "Capsicum chinense", | |
| "Abe Lincoln Tomato": "Solanum lycopersicum", |
| // Check if rectangle a contains rectangle b | |
| // Each object (a and b) should have 2 properties to represent the | |
| // top-left corner (x1, y1) and 2 for the bottom-right corner (x2, y2). | |
| function contains(a, b) { | |
| return !( | |
| b.x1 < a.x1 || | |
| b.y1 < a.y1 || | |
| b.x2 > a.x2 || | |
| b.y2 > a.y2 | |
| ); |
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
What happens if you tell GitHub it's JSON
{
"hello": "world" // I want my comments!
}Use jsonc as the language instead
| function getHightlightCoords() { | |
| var pageIndex = PDFViewerApplication.pdfViewer.currentPageNumber - 1; | |
| var page = PDFViewerApplication.pdfViewer.getPageView(pageIndex); | |
| var pageRect = page.canvas.getClientRects()[0]; | |
| var selectionRects = window.getSelection().getRangeAt(0).getClientRects(); | |
| var viewport = page.viewport; | |
| var selected = selectionRects.map(function (r) { | |
| return viewport.convertToPdfPoint(r.left - pageRect.x, r.top - pageRect.y).concat( | |
| viewport.convertToPdfPoint(r.right - pageRect.x, r.bottom - pageRect.y)); | |
| }); |
| // requires Underscore.js | |
| // uses jQuery style funciton declaration (if you aren't using jQuery, simply re-arrange the declaration) | |
| function sum(arr) { | |
| // returns the sum total of all values in the array | |
| return _.reduce(arr, function(memo, num) { return memo + num}, 0); | |
| } | |
| function average(arr) { | |
| // returns the average of all values in the array |
| httpClient.DefaultRequestHeaders.Authorization = | |
| new AuthenticationHeaderValue( | |
| "Basic", | |
| Convert.ToBase64String( | |
| System.Text.ASCIIEncoding.ASCII.GetBytes( | |
| string.Format("{0}:{1}", username, password)))); |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.
Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.
As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.
{