If you are using "hash" navigation for a single page app on Github Org or User Pages, you may run into a URL problem.
Users who visit a url like
http://myorg.github.io/upcoming-events
This requires `brew install jq` which is a command json query. | |
I got this from @krisselden |
function isValidEmail(str) { | |
/** | |
* These comments use the following terms from RFC2822: | |
* local-part, domain, domain-literal and dot-atom. | |
* Does the address contain a local-part followed an @ followed by a domain? | |
* Note the use of lastIndexOf to find the last @ in the address | |
* since a valid email address may have a quoted @ in the local-part. | |
* Does the domain name have at least two parts, i.e. at least one dot, | |
* after the @? If not, is it a domain-literal? | |
* |
// tests/acceptance/foo-test.js | |
// Assert that text should be found | |
assert.hasText('Not Found'); // Error: Could not find text "Not Found" on the page | |
// Provide custom message | |
assert.hasText('Not Found', 'Expected to find "Not Found"'); // Error: Expected to find "Not Found" | |
// Find any number of elements containing the query text | |
text('Found'); // [<div>Found</div>, <input value="Found">] |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
#!/usr/bin/env bash | |
# A basic Self Signed SSL Certificate utility | |
# by Andrea Giammarchi @WebReflection | |
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network | |
# # to make it executable and use it | |
# $ chmod +x certificate | |
# $ ./certificate # to read the how-to |
/* To add more icons just copy these three lines */ | |
.icon-tomato, | |
.icon-left-tomato:before, | |
.icon-right-tomato:after{ | |
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/131442/tomato.svg); | |
} | |
If you have a package where a lot of people are still using a legacy version of it you might want to keep pushing (security-)fixes to that "branch".
Let's say the "latest" version of your package is "5.4.0", but there is as significant amount of people still using "4.7.4" – the last version you released before doing "5.0.0".
You found a critical bug in "5.4.0" and push it as out as "5.4.1", but it applies to "4.7.4" as well and so you want to do "4.7.5".
Assuming you have semantic-release already set up, you can follow these steps to get that "4.7.5" legacy support release out.
git checkout v4.7.4
git checkout -b 4.x
(You can choose any branch name, just make sure to use the same in step 3)All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent