Skip to content

Instantly share code, notes, and snippets.

View BekBrace's full-sized avatar
💻
Star it before you Fork it!

Bek Brace BekBrace

💻
Star it before you Fork it!
View GitHub Profile
@BekBrace
BekBrace / .fish
Created December 23, 2022 10:23
Changing aliases from LS to EXA in fish shell
alias l='exa'
alias la='exa -a'
alias ll='exa -lah'
alias ls='exa --color=auto'
@BekBrace
BekBrace / init.vim
Last active March 15, 2024 07:54
My Neovim customized init file [ ~/. config/nvim/init. vim ]
"Bek Brace @ 30.11.2022
:set relativenumber
:set number
:set autoindent
:set tabstop=4
:set shiftwidth=4
:set smarttab
:set softtabstop=4
:set mouse=a
@BekBrace
BekBrace / starship.toml
Created December 23, 2022 09:59
This is my starship.toml config file for starship ( A cross-shell prompt [love it because it's minimal] )
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = true
# Replace the '❯' symbol in the prompt with '➜'
[character] # The name of the module we are configuring is 'character'
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
error_symbol = "[✖](bold red) "
@BekBrace
BekBrace / .bashrc
Last active December 23, 2022 10:01
Basic bashrc config file
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@BekBrace
BekBrace / nano.config
Last active August 7, 2022 06:36
config for nano editor
set tabsize 4
set tabstospaces
set autoindent
set trimblanks
set linenumbers
set constantshow
set titlecolor white,green
set keycolor cyan
set functioncolor cyan
set numbercolor yellow
@BekBrace
BekBrace / nano editor cheatsheet
Created August 7, 2022 06:35
nano editor cheatsheet
Overview of nano's shortcuts
The editor's keystrokes and their functions
File handling
Ctrl+S Save current file
Ctrl+O Offer to write file ("Save as")
Ctrl+R Insert a file into current one
Ctrl+X Close buffer, exit from nano
Editing
@BekBrace
BekBrace / fix.txt
Last active June 26, 2022 07:00
Fixing React Error : This is probably not a problem with npm. There is likely additional logging output above.
First, delete package-lock.json and node modules
Second, run the command : npm cache clean --force
Next, run the command : npm install
Finally, you should be able to run your react server : npm start
@BekBrace
BekBrace / $profile.ps1
Last active December 31, 2022 08:55
this is profile file in documents for ohmyposh terminal customized theme
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
# S way
# oh-my-posh --init --shell pwsh --config ~/jblab_2021.omp.json | Invoke-Expression
# S theme
# oh-my-posh --init --shell pwsh --config C:\Users\amirb\AppData\Local\Programs\oh-my-posh\themes\ohmyposhv3-v2.json | Invoke-Expression
# OMP way
@BekBrace
BekBrace / fizzbuzz.py
Created May 30, 2022 06:14
FizzBuzz in Python
for fizzbuzz in range(51):
if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0:
print("fizzbuzz")
continue
elif fizzbuzz % 3 == 0:
print("fizz")
continue
elif fizzbuzz % 5 == 0:
print("buzz")
continue
@BekBrace
BekBrace / fibonacci.py
Created May 30, 2022 06:13
Fibonacci sequence in Python
# Program to display the Fibonacci sequence up to n-th term
nterms = int(input("How many terms? "))
# first two terms
n1, n2 = 0, 1
count = 0
# check if the number of terms is valid
if nterms <= 0: