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
# Update Neovim to latest from master | |
# https://github.com/neovim/neovim/commits/master | |
# You should have the Neovim repo cloned | |
upnvim() { | |
cd ~/vim-dev/sources/neovim # change to your local repo | |
git pull | |
make distclean | |
make CMAKE_BUILD_TYPE=RelWithDebInfo -j4 # Fast with Debug info. Not quite Release fast. | |
sleep 10 # You don't need this but I have my reasons :-) | |
sudo make install |
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
use std::collections::VecDeque; | |
#[derive(Debug, PartialEq)] | |
pub struct BinaryTree<T> { | |
pub value: T, | |
pub left: Option<Box<BinaryTree<T>>>, | |
pub right: Option<Box<BinaryTree<T>>>, | |
} | |
impl<T> BinaryTree<T> |
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
-- Setup cmp setup buffer configuration - 👻 text off for markdown | |
local cmp = require "cmp" | |
cmp.setup.buffer { | |
sources = { | |
{ name = "vsnip" }, | |
{ name = "spell" }, | |
{ | |
name = "buffer", | |
opts = { | |
get_bufnrs = function() |
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
-- Setup nvim-cmp | |
local cmp = require "cmp" | |
local lspkind = require "lspkind" | |
cmp.setup { | |
snippet = { | |
expand = function(args) | |
vim.fn["vsnip#anonymous"](args.body) | |
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
on run argv | |
tell application "Brave Browser" | |
repeat with w in (windows) | |
set j to 0 | |
repeat with t in (tabs of w) | |
set j to j + 1 | |
if title of t contains (item 1 of argv) then | |
set (active tab index of w) to j | |
return | |
end if |
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
-- *** Neovim Config Luatized *** -- | |
require("joel.plugins") | |
-- treesitter & lsp | |
require("joel.config") | |
-- telescope | |
require("joel.telescope") | |
-- mappings, options, globals |
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
# Custom Aliases | |
alias -s txt=nvim | |
alias -s vim=nvim | |
alias -s zsh=nvim | |
alias -s zshrc=nvim | |
alias -s {c,h}=nvim | |
alias -s {js,json}=nvim | |
alias -s {md,MD}=nvim | |
alias -s {rs,toml}=nvim | |
alias -s {yml}=nvim |
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
#look up synonym - (word) | |
# slow and buggy | |
syn() { | |
curl -s "https://api.dictionaryapi.dev/api/v2/entries/en/$1" | jq '.[].meanings[].definitions[].synonyms[]' | |
} | |
# zd - use zoxide & FZF to find and go to directory | |
# Not sure why zoxide query -i with FZF doesn't CD | |
zd() { | |
local dir |
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
if (!Array.prototype.swap) { | |
Object.defineProperty(Array.prototype, 'swap', { | |
value: function (idxA, idxB) { | |
if (this == null) { | |
throw new TypeError('"this" is null or not defined'); | |
} | |
const o = Object(this); | |
const len = o.length >>> 0; | |
if (len === 0) { |
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
const data = { | |
items: [[{ | |
name: "Joel", | |
location: "Texas", | |
Sport: "Running", | |
Id: 5 | |
}, | |
{ | |
name: "Michelle", | |
location: "California", |
NewerOlder