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.
@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
# 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'
[
{
"key": "shift+cmd+g",
"command": "workbench.view.scm"
},
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
{
"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 / 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",
### 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:
sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev -y &&
sudo apt upgrade -y &&
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh &&
wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local &&
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc &&
source ~/.bashrc &&
cd ~ && git clone https://github.com/filecoin-project/lotus.git &&
cd lotus && make clean all && sudo make install