Skip to content

Instantly share code, notes, and snippets.

@johnnymatthews
johnnymatthews / Symlink default folders to Google Drive on OSX.sh
Last active April 5, 2018 18:42
Deletes the default folders in OSX and replaces them with Symlinks to folders in a Google Drive installation.
{
"editor.fontSize": 14,
"editor.lineHeight": 30,
"editor.minimap.enabled": true,
"editor.minimap.showSlider": "always",
"editor.wordWrap": "on",
"editor.detectIndentation": false,
"explorer.confirmDelete": false,
"terminal.integrated.fontSize": 14,
"window.zoomLevel": 0,
@johnnymatthews
johnnymatthews / Recover Public from Private SSH Key
Last active January 17, 2019 16:11
This line allows you to recover your public ssh key from your private key. Assuming your private key is called `id_rsa` and you want your public key to be called `id_rsa.pub`.
# This line allows you to recover your public ssh key from your private key.
# Assuming your private key is called `id_rsa` and you want your public key
# to be called `id_rsa.pub`.
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
# Your id_rsa file needs to have the correct permissions assigned to it. Run
# this line to set them.
sudo chmod 600 ~/.ssh.id_rsa
@johnnymatthews
johnnymatthews / cmus-osx.sh
Created October 10, 2019 15:41
Update your CMUS cache with a keypress.
# 1. Create a file called update-library.sh and add the following lines.
#!/bin/bash
cmus-remote -C clear
cmus-remote -C "add ~/Music"
cmus-remote -C "update-cache -f"
cp ~/Music/Playlists/* ~/.config/cmus/
# 2. Change permissions to make the script executable:
# Add a submodule
git submodule add -b master https://github.com/mohnjatthews/docs content
git submodule init
# Update a submodule
git submodule update --remote
# Update a submodule that came with a cloned repo
git submodule update --init --remote
[
{
"key": "shift+cmd+g",
"command": "workbench.view.scm"
},
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
# VERIFY A FILE'S CHECKSUM
# Enter the hash of the file from the website, and the name of
# the file, with an asterix * pre-pending it.
# shasum -a 256 -c <<<'HASH_OF_FILE_FROM_WEBSITE' '*NAME_OF_FILE'
# Here's an example:
shasum -a 256 -c <<<'302d795f6777ad187f978e9ca5eb11ae96930effd8816fa6380c7e14fdca98e9' '*coinomi-wallet-1.1.1-macos.dmg'
@johnnymatthews
johnnymatthews / windows-terminal-settings.js
Last active November 10, 2020 22:53
My settings.json file for Windows Terminal. Remove the Azure and PowerShell 5.0 items.
// This file was initially generated by Windows Terminal Preview 1.4.2652.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@johnnymatthews
johnnymatthews / semantic-commit-messages-for-documentations.md
Last active April 14, 2024 16:58 — forked from joshbuchea/semantic-commit-messages.md
Semantic commit messages for documentation.

I'm sure we've all seen Git repos with a shocking amount of branches. Without a decent naming convention, things can get messy real quick. The idea here is that adding the tags below to the start of your branch makes it easier for folks to quickly figure out what your trying to do.

These are the available types:

Type Description Example
feat Adds a new section or page. New paragraphs to existing documentation are not a feature. feat/desktop-install
add Adds a new paragraph, sentence, or image to existing documentation. add/desktop-install-screenshots
remove Removes existing paragraphs, sentences, or images from existing documentation remove/browser-disclaimer
fix Fixes an existing typo, spelling, grammar, or formatting mistake. feat/desktop-broken-repo-link
### Keybase proof
I hereby claim:
* I am johnnymatthews on github.
* I am johnnymatthews (https://keybase.io/johnnymatthews) on keybase.
* I have a public key ASDH3sVcXMOfVEtSgXZLcO1b95IQVvX0FZHkRohKooeloQo
To claim this, I am signing this object: