This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
pbcopy | |
pane_count=$(tmux list-panes | wc -l) | |
edit() { | |
local current_pane="$(tmux list-panes -F "#{pane_active} #{pane_pid} #{pane_current_command}" | grep "^1" | awk '{print $3}')" | |
if [ "$current_pane" = "nvim" ] || [ "$current_pane" = "nvi" ] || [ "$current_pane" = "Vim" ] || [ "$current_pane" = "vim" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mapleader = ' ' | |
" Enable filetype detection and plugin functionality | |
filetype plugin on | |
" Enable syntax highlighting | |
syntax on | |
" Set the tab size to 2 spaces | |
set tabstop=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use v5.14; | |
use warnings; | |
use strict; | |
my $dir = `git rev-parse --show-toplevel`; | |
$dir =~ s/^\s+|\s+$//g; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g terminal-overrides ',xterm-256color:Tc' | |
set -g default-terminal "tmux-256color" | |
set -as terminal-overrides ',xterm*:sitm=\E[3m' | |
# start window indexing at one instead of zero | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set -g renumber-windows on | |
setw -g mode-keys vi | |
# fix accidently typing accent characters, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
gh api graphql \ | |
-f query=" | |
query { | |
repository(owner: \"ORG\", name: \"REPO_NAME\") { | |
discussions(first: 29) { | |
edges { | |
node { | |
title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias sync="stow . -t ~/" | |
alias chmox="chmod +x" | |
alias l=exa | |
alias ls=exa | |
alias ll="exa -ll" | |
alias la="exa -la" | |
alias lg=lazygit | |
# alias vi="$EDITOR" | |
alias vi="vim" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# typed: true | |
require 'sorbet-runtime' | |
# Result... | |
module Result | |
extend T::Sig | |
# Ok... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local M = {} | |
---@return 'main' | 'develop' | |
local function decide_base_branch() | |
if vim.fn.system 'git branch --contains develop' == 'error: malformed object name develop' then | |
return 'main' | |
end | |
return 'develop' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! project#Switch(path) abort | |
if tabpagenr('$') == 1 | |
%bd | |
endif | |
execute 'cd ' . a:path | |
execute 'Dirvish' | |
endfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:ReturnProjectRoot() abort | |
" TODO: This doesn't work on non git projects | |
return system('git rev-parse --show-toplevel')->substitute('\n', '', '') | |
endfunction | |
function! github#pr#CreatePr() abort | |
let l:template_path = s:ReturnProjectRoot() . '/.github/pull_request_template.md' | |
call execute('tabe ' . tempname()) |
NewerOlder