Skip to content

Instantly share code, notes, and snippets.

@HenryHey
HenryHey / .bash_profile
Last active December 14, 2019 07:07
Format bash prompt (adding git branch name if in git directory)
export EDITOR=vim
export FZF_DEFAULT_COMMAND="rg --files ."
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
alias ls=exa
alias vim=nvim
alias ssh=/usr/local/bin/color-ssh
gb() {
@HenryHey
HenryHey / updateSshPermissions.sh
Created November 22, 2019 10:49
ssh permissions
# If need to generate public key from private one
# ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
chmod 700 ~/.ssh
chmod 644 ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
@HenryHey
HenryHey / init.vim
Last active December 11, 2019 14:52
Neovim config file
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'altercation/vim-colors-solarized'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
@HenryHey
HenryHey / blaseballAutobet.js
Last active May 11, 2021 04:40
Blaseball auto bet to the team with the best (probably not) chance of winning
// This bookmarklet will auto bet on the team with highest odds. Or the left team if equal odds.
// I guess this saves around 20 seconds and 30 clicks of your life. You're welcome!
// 1. Create a new bookmark and give it a name
// 2. Paste the following code in the URL field
javascript:(async function () { let goBet=async e=>{length=document.getElementsByClassName("Widget-Button btn btn-success").length;for(let t=0;t<length;t++)try{document.getElementsByClassName("Widget-Button btn btn-success")[t].children[0].click(),await new Promise(t=>setTimeout(t,e)),[...document.getElementsByClassName("ModalForm-Form-Team-Percentage")].filter(e=>parseFloat(e.innerHTML)>=50)[0].click(),document.getElementsByClassName("ModalForm-Form-Inputs-Amount-Max")[0].click(),document.getElementsByClassName("ModalForm-Submit btn btn-success")[0].click(),await new Promise(t=>setTimeout(t,2*e))}catch(t){await new Promise(t=>setTimeout(t,2*e)),await goBet(500)}return"Done!"};await goBet(500); } )();
// 3. Go to https://www.blase