// Copyright 2021 Google LLC. | |
// SPDX-License-Identifier: Apache-2.0 | |
let videos = [ | |
{ | |
url: 'https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4', | |
type: 'video/mp4', | |
}, { | |
url: 'https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm', | |
type: 'video/webm', |
" Open Netrw on the directory of the current file | |
nnoremap <leader>dd :Lexplore %:p:h<CR> | |
" Toggle the Netrw window | |
nnoremap <Leader>da :Lexplore<CR> | |
if &columns < 90 | |
" If the screen is small, occupy half | |
let g:netrw_winsize = 50 | |
else |
Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal
for more info.
Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.
(To be improved)
- httpie (which provides the
http
command) —pip install httpie
- Save the
git-branch-protection.sh
asgit-branch-protection
somewhere in your path (something like~/bin
or~/.local/bin
if you already use it) - Generate a GitHub token and save it as
~/.config/github_token
.
I personally prefer [Semver][]. I think it's reasonable, simple, and makes sense. But as a good Haskell citizen, I'd like to be [PVP][]-compliant as well. Here is a bit of a graphic showing how the two systems are almost the same:
PVP: A . B . C . ...
Semver: Major . Minor . Patch
^ ^ ^
| | |
| | ` increment for other changes
| |
| ` increment on non-breaking change
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
By default, scroll bars do not appear on Mac except when the user is scrolling and when there is hidden content. You can double check this by going to System Preferences -> General -> Show scroll bars: Automatically based on mouse or trackpad.
When you do scroll, the width of viewport and the available width of the inner content does not change from what it was. If the width was 300 pixels, it still is 300 pixels.
If you change the "Show scroll bars" setting to "Always" then the scrollbar takes up a decided amount of width - 16 pixels to be precise.[^1] Let's say your browser height is 300 pixels and your broswer width is also 300 pixels. With this setting, if you toggle the height of the body from 300 to 600, causing scrollableness, then a scrollbar will appear only have you have done the toggle. The width of your body will have gone from 300 to 284 pixels, because the scrollbar takes up space in a way that it did not in the other setting. Interestingly, if you're talking about
Scroll to the bottom for the answer
Question
There's two ways to increase the default font size in browsers:
- set a default zoom level > 100% ("page zooming")
- set a default font size > 16px ("text scaling")
Option 1 relies on the browser's proportional scaling. This feature was
-
How does the go build command work ? URL (2016-07-26 13:41:13) [4 min]
-
Test Driven Development Kata \u2013 Roman to Arabic in JavaScript URL (2016-07-20 12:32:56) [7 min]
-
C# - The C# Memory Model in Theory and Practice, Part 2 URL (2016-07-20 11:01:41) [18 min]
-
What every programmer needs to know about game networking URL (2016-07-07 11:02:52) [8 min]