Skip to content

Instantly share code, notes, and snippets.


Mark remarkablemark

View GitHub Profile
Asheq /
Last active Jul 23, 2020
Compare CSS "display" Property Values
Behavior inline inline-block block

tmux cheatsheet

PREFIX is the prefix key (Ctrl-b is the default). ^d means Ctrl-d. ^D means Ctrl-Shift-d.

Action Command
start a new session tmux
tmux new
tmux new-session
reattach an attached/detached session tmux attach
tmux attach-session
tdlm /
Last active May 17, 2017
Vim Wizardry
Command Effect
V Visual line highlight.
C-V Visual block highlight.
C-z Suspend Vim and go go shell. Type fg to return to Vim session.
a Append mode.
A Go to end of line and go into insertion mode.
I Go to beginning of line and go into insertion mode.
R Replace mode. (backspace will undo any newly-typed characters!)
o Create a new line below and go into insertion mode.
david-mark /
Last active Nov 2, 2020
'use strict' Considered Pointless and Harmful

'use strict' Considered Pointless and Harmful

What is strict mode?

According to the MDN reference, it is:

ECMAScript 5's strict mode is a way to opt in to a restricted variant of JavaScript [sic].

It goes on to say:

wojteklu /
Last active Jan 25, 2021
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.

General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

elky / truncate.css
Created Sep 1, 2016
text-overflow ellipsis with 100% width
View truncate.css
<div class="element">
<div class="truncate">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
remarkablemark /
Last active Nov 7, 2018
A collection of useful VIM tips and tricks.

Vim Tips

Type Action Command
Editor Reload window :e
Horizontal split Ctrl w, s
Vertical split Ctrl w, v
Switch between windows Ctrl w, (xor Ctrl w, h, j, k, l)
Open new tab :tabe
Go to next tab gt
Rich-Harris /
Last active Jan 20, 2021
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

marcysutton /
Last active Sep 18, 2020
Enable Chrome Accessibility Experiment

NOTE: This is no longer an experiment! You can use the accessibility inspector in Chrome Devtools now, including a fantastic color contrast inspection tool. Read more:

Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

remarkablemark /
Last active Jul 11, 2016
Learning resources pertaining to computer science and other topics.