Skip to content

Instantly share code, notes, and snippets.

@borekb
borekb / 7-zip-cheat-sheet.md
Last active May 23, 2018 08:40
7-Zip CLI cheat sheet

7-Zip Cheat Sheet

Extract to directory

7z x archive.zip -oSomeDirectory
@borekb
borekb / msys2-pty.md
Created July 29, 2018 14:26
Dealing with tty / pty in MSYS2 shells

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 / finder-customizations.sh
Created November 18, 2018 10:40
macOS finder customizations
# 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 / install.sh
Created April 9, 2019 16:55
Install dotfiles
#!/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 / clink.lua
Last active April 26, 2020 20:07
cmder `clink.lua` to show number of commits to push. See comment below for description.
@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:

@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
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 / 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: