Skip to content

Instantly share code, notes, and snippets.

@borekb
borekb / README.md
Last active Mar 20, 2021
Why Git doesn't track renames – original email by Linus Torvalds
View README.md

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 Sep 4, 2020
Default color palette of GitHub labels
View README.md

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 / synology-shutdown-temperature.md
Last active Jul 25, 2021
How to increase the shutdown temperature on Synology NAS
View synology-shutdown-temperature.md

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 Jul 13, 2021
How to link to headings in GitHub issues and pull requests
View README.md

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 / README.md
Last active Jul 30, 2020
Notes from trying the three most popular GraphQL extensions for VSCode
View README.md

VSCode extensions for GraphQL

Quick research and comparison.

Apollo

Notes from May 2019, slightly updated in July 2020:

@borekb
borekb / install.sh
Created Apr 9, 2019
Install dotfiles
View install.sh
#!/usr/bin/env bash
# Installs symlinks to dotfiles into the $HOME directory.
#
# Flags:
#
# -n Dry run
# -f Force – overwrite files in $HOME if they exist
#
# Inspired by https://github.com/mplacona/dotfiles/blob/65329dc/bootstrap.sh but quite different in the end.
@borekb
borekb / versionpress-on-local-by-flywheel.md
Created Jan 15, 2019
VersionPress on Local by Flywheel
View versionpress-on-local-by-flywheel.md

(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 / finder-customizations.sh
Created Nov 18, 2018
macOS finder customizations
View finder-customizations.sh
# Finder: show full path in title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: allow text selection in Quick Look
@borekb
borekb / msys2-pty.md
Created Jul 29, 2018
Dealing with tty / pty in MSYS2 shells
View msys2-pty.md

Dealing with tty / pty in MSYS2 shells

In my experience, the biggest practical hurdle when running a mix of native and MSYS2 programs is related to tty / pty. I wish I understood perfectly what is going on but at least I think I can explain the problem and what are the options. When I learn more, I'll be happy to update this post.

The problem

When you run a shell of your choice like bash.exe or zsh.exe, you have three main options:

  1. Run it in the mintty terminal.
  2. Run it in Windows console ("cmd.exe").
@borekb
borekb / 7-zip-cheat-sheet.md
Last active May 23, 2018
7-Zip CLI cheat sheet
View 7-zip-cheat-sheet.md

7-Zip Cheat Sheet

Extract to directory

7z x archive.zip -oSomeDirectory