Skip to content

Instantly share code, notes, and snippets.

View JustBarnt's full-sized avatar
💻
Doing what I love.

Brent Williams JustBarnt

💻
Doing what I love.
View GitHub Profile
@JustBarnt
JustBarnt / .vimrc
Last active September 22, 2024 12:21
VsVim configuration
let mapleader=" "
let maplocalleader="\\"
set vsvim_useeditordefaults
set number
set expandtab
set ignorecase
set incsearch
set hlsearch
set smartcase
@JustBarnt
JustBarnt / .zshenv
Last active March 15, 2024 20:48
My zsh ENV
typeset -U PATH path
export LANGUAGE=en_US.UTF-8
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
@JustBarnt
JustBarnt / .zprofile
Last active March 9, 2024 15:12
ZSH zprofile Setup
if hash nvim 2>/dev/null; then
export EDITOR=nvim
export MANPAGER='nvim +Man!'
else
export EDITOR=vim
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
@JustBarnt
JustBarnt / clangd.md
Created February 29, 2024 18:26 — forked from Strus/clangd.md
How to use clangd C/C++ LSP in any project

How to use clangd C/C++ LSP in any project

tl;dr: If you want to just know the method, skip to How to section

Clangd is a state-of-the-art C/C++ LSP that can be used in every popular text editors like Neovim, Emacs or VS Code. Even CLion uses clangd under the hood. Unfortunately, clangd requires compile_commands.json to work, and the only way to painlessly generate it is to use CMake.

But what if I tell you you can quickly hack your way around that, and generate compile_commands.json for any project, no matter how compilcated? I have used that way at work for years, originaly because I used CLion which supported only CMake projects - but now I use that method succesfully with clangd and Neovim.

Method summary

Basically what we need to achieve is to create a CMake file that will generate a compile_commands.json file with information about:

@JustBarnt
JustBarnt / sqlBuilderClass.cs
Last active August 12, 2022 22:08
SqlBuilder and Adapter Sandbox
using Microsoft.Data.SqlClient;
using System.Data;
namespace ScratchBoardCSharp;
public class Program
{
static void Main(string[] args)
{
@JustBarnt
JustBarnt / madlibs.php
Created July 1, 2022 14:40
PHP MadLibs
<?php
//Arrays to randomly select for MADLIB
$noun_array = array('house', 'car', 'person', 'cat', 'dog');
$verb_array = array('run','jump','wave','bite','purr');
$color_array = array('black', 'blue', 'purple', 'red', 'green');
$dist_array = array('meters', 'centimeters', 'inches', 'feet', 'light years');
//Base Vars
$num_of_stories = 3;
@JustBarnt
JustBarnt / .eslintrc.json
Last active September 4, 2022 03:55
ESLint | Final
{
"env": {
"browser": true,
"node": true
},
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],