Skip to content

Instantly share code, notes, and snippets.

@borekb
borekb / README.md
Last active April 2, 2024 19:56
How to link to headings in GitHub issues and pull requests

How to link to headings in GitHub issues and pull requests

If you have an issue comment / PR description on GitHub, it doesn't automatically get anchors / IDs that you could link to:

Screenshot 2019-07-11 at 13

What I like to do is to add a visible # character like this:

Screenshot 2019-07-11 at 13 42 21

@borekb
borekb / synology-shutdown-temperature.md
Last active February 17, 2024 15:13
How to increase the shutdown temperature on Synology NAS

Synology: how to increase shutdown temperature

My Synology DS218+ runs with a single SSD disk that has an operating temperature range of 0–70 °C, which is common for SSDs. Synology, however, has a default shutdown temperature of 61 °C, probably due to HDDs and some lazy programming.

I'm a very light user of NAS – all I want is a network attached storage and silence. My DS218+ has one 2 TB SSD disk in it and I've changed the system fan for a quieter / slower one.

Everything runs fine but about once in a month, I get this notification:

[Synology DS218+]Synology shut down due to disk overheating. >

@borekb
borekb / README.md
Last active January 19, 2024 14:59
GitHub-style preview for stackedit.io

GitHub-style preview stylesheet for StackEdit.

The stylesheet is based on https://github.com/sindresorhus/github-markdown-css, see comments in github.css to learn what was updated.

How to use:

  1. Click "Raw" for the github.css file below
  2. Copy the URL
  3. Paste it into RawGit
  4. Copy the RawGit URL and add it in StackEdit > Settings > Extensions > UserCustom extension like this:
@borekb
borekb / README.md
Last active August 28, 2023 12:33
Why Git doesn't track renames – original email by Linus Torvalds

Why Git doesn't track renames – original email by Linus Torvalds

A copy / backup of Linus' email from 15 Apr 2005.

@borekb
borekb / README.md
Last active March 2, 2023 20:50
Default color palette of GitHub labels

GitHub labels – default color palette

As of 09/2020, GitHub uses this color palette for labels:

Screenshot 2020-09-04 at 15 46 05-shadow

Here are the hex codes:

@borekb
borekb / README.md
Last active August 10, 2022 14:14
Docker and Git Bash / MSYS2 on Windows: path conversion workaround

👋 Moved to https://github.com/borekb/docker-path-workaround


Docker in Git Bash / MSYS2 on Windows: path conversion workaround

UPDATE 07/2018: I switched from Git Bash to MSYS2 recently which should be very similar, if not the same, but there some subtle differences which made me realize this is more tricky than I thought and that I don't 100% understand what is going on. If someone can help, please let me know in the comments.

Invoking docker in MSYS2 shell or Git Bash typically fails with complains about paths, for example:

@borekb
borekb / README.md
Created February 25, 2017 21:24
VS Code 'Open in browser' task
  1. Configure tasks
  2. Paste from below
  3. Ctrl+Shift+B on an HTML file
@borekb
borekb / versionpress-on-local-by-flywheel.md
Created January 15, 2019 07:25
VersionPress on Local by Flywheel

(Note: this is a rough draft of a blog post I'd like to publish to https://versionpress.com/blog.)

Run VersionPress on Local by Flywheel

Local by Flywheel is a great way to run WordPress sites locally. Here is how you can experiment with VersionPress using this tool.

(Note: You'll be able to try change tracking, undo, restore and other features of VersionPress but not its cloning and merging features which require two environments to work with.)

First, create a new site in Local. I'd also recommend enabling HTTPS for good measure (modern browsers will be happier). Local makes this super-easy, just click the Trust button on the SSL tab and update the site's URL (I prefer to do that via WP-CLI, open the SSH session as shown below and execute something like wp search-replace --all-tables http://vp-demo.local https://vp-demo.local).

@borekb
borekb / README.md
Last active July 30, 2020 13:35
Notes from trying the three most popular GraphQL extensions for VSCode

VSCode extensions for GraphQL

Quick research and comparison.

Notes from May 2019, slightly updated in July 2020: