Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View remarkablemark's full-sized avatar

Mark remarkablemark

View GitHub Profile
@tdlm
tdlm / how-i-work.md
Last active May 19, 2023 02:13
How I Work

When I Work

I am in the Pacific time zone (UTC -8/-7). Typically, I work from 9:00am - 6pm after waking up at about 5:30am, hopefully with a brief walk around the block, and getting the kids started with their day. I try to take a lunch anywhere between 11:30am and 2pm. Sometimes I'll step away for a short sanity break. Other than that, I'm usually at my desk. At the very least, I have my phone with me.

All that being said, I try my best to stay mindful, wherever I am. When I'm at work, my priority is work. When I'm with family, however, work becomes a close second.

Where I Work

I work from my home office in Anaheim Hills, California.

@Asheq
Asheq / css-display.md
Last active November 17, 2022 13:18
Compare CSS "display" Property Values
Behavior inline inline-block block
@remarkablemark
remarkablemark / tmux-cheatsheet.md
Last active March 21, 2021 10:26
tmux cheatsheet

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
@codediodeio
codediodeio / database.rules.json
Last active January 28, 2024 19:07
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@tdlm
tdlm / vim.md
Last active May 17, 2017 16:10
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
david-mark / usestrict.md
Last active December 27, 2023 17:07
'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
wojteklu / clean_code.md
Last active April 23, 2024 08:06
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
elky / truncate.css
Created September 1, 2016 11:55
text-overflow ellipsis with 100% width
/*
Demo: https://jsfiddle.net/elky/f6khaf2t/
<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
remarkablemark / vim-tips.md
Last active November 7, 2018 17:10
A collection of useful VIM tips and tricks.

Vim Tips

Type Action Command
Editor Reload window :e
:edit
Horizontal split Ctrl w, s
:sp
:split
Vertical split Ctrl w, v
:vs
:vsplit
Switch between windows Ctrl w, (xor Ctrl w, h, j, k, l)
Open new tab :tabe
Go to next tab gt
@Rich-Harris
Rich-Harris / service-workers.md
Last active April 21, 2024 16:24
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 twitter.com/rich_harris.

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.