Skip to content

Instantly share code, notes, and snippets.

View SMotaal's full-sized avatar
🙃
mia

Saleh Abdel Motaal SMotaal

🙃
mia
View GitHub Profile
@SMotaal
SMotaal / GitHub-Forking.md
Created March 20, 2020 14:43 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@SMotaal
SMotaal / README.md
Last active July 12, 2019 18:26
Data URL Header

Data URL Header

To extract the specific [<mediatype>][;base64] portions of Data URLs — per MDN's doc — the following aspects were explored:

  1. Hard-coding a specific list of allowed <type>/<subtype> into the expression versus hard-coding only the <type>.

  2. A more complete capture of the *( ";" parameter ) portion — per RFC2397 — returning separately the attribute-value pairs and/or the last base64 portions.

The recommended expression for #28614 would roughly be (pending obvious refinements if will be used):

We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Test name,Link,VoiceOver OSX,VoiceOver iOS,VoiceOver iPad,NVDA,JAWS,IE8,IE9,IE10,Internet Explorer 11 (Windows),Edge (Windows),Google Chrome (Windows),Mozilla Firefox (Windows),Safari (macOS),Google Chrome (macOS),Mozilla Firefox (macOS),Safari (iOS),Google Chrome (iOS),Google Chrome (Android),Samsung Internet (Android)
Control,https://output.jsbin.com/yesilis,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected,As expected
Visually Hidden with CSS,https://output.jsbin.com/xiqohaz,"Visually hidden text in links is always at the front for example: ""link, name Change"".
This is still the same if the visually hidden text is in the middle of the link.
Buttons behave as expected.
","When swiping left and right visually hidden text is read out.
When pressing on links directly visually hidden text is not read out.
@SMotaal
SMotaal / fence-block-closer-comment.md
Last active July 7, 2019 13:32
Mysteriously Markdown
  • Tokenizing works normally after fenced html block that is empty.

<content></content>
@SMotaal
SMotaal / README.md
Created June 19, 2019 14:06
Markout
<title>smotaal.io/markout</title>

HTML-flavoured markdown-inspired client-side renderer

@SMotaal
SMotaal / matchAll.js
Created April 26, 2019 23:51
ES2019: Optimized `matchAll` implementation
export default Function.call.bind(
// /* TODO: Uncomment eventually */ String.prototype.matchAll ||
{
/**
* @this {string}
* @param {RegExp | string} pattern
*/
*matchAll() {
const matcher = arguments[0] && (arguments[0] instanceof RegExp ? arguments[0] : RegExp(arguments[0], 'g'));
const string = String(this);
@SMotaal
SMotaal / jsbin-settings.json
Last active March 10, 2019 18:14
Experiment: Globals
{"processors":{}}
@SMotaal
SMotaal / results.md
Created January 20, 2019 19:29
RegExp Methods
browser regexp method time
Chrome /)|/ exec : 6.9599609375ms
Chrome /)|/ [Symbol.search] 6.98681640625ms
Chrome /)(?=|)/ exec 5.283203125ms
Chrome /)(?=|)/ [Symbol.search] 4.552001953125ms
Chrome /(?=)|)./ exec 4.844970703125ms
Chrome /(?=)|)./ [Symbol.search] 5.030029296875ms
Chrome /(?=)|)/ exec 4.688232421875ms
Chrome /(?=)|)/ [Symbol.search] 4.72802734375ms
@SMotaal
SMotaal / README.md
Created December 25, 2018 18:48
URL.resolve Polyfill

URL.resolve(…) Polyfill

Concept

(url => (href, specifier) => {
  try {
    url.href = href;
    if (/^\.{1,2}\/|^\/(?=[^\/]|$)/.test(specifier)) {
 const [, path = '', search = '', hash = ''] = /([^?#]*)([^#]*)(.*)/.exec(specifier);