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 / 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 / cheatSheet.docker
Last active May 4, 2023 06:30
Docker Cheat Sheet
Container Management Commands
// docker create image [Create the container]
// docker run image [start the image]
// docker start container [start the container]
// docker stop container [graceful stop]
// docker kill container [kill container]
// docker restart container [stop + start]
// docker pause container [suspends container]
// docker unpause container [resume container]
@BekBrace
BekBrace / booking.sql
Last active January 28, 2023 18:35
MySQL Cheat Sheet
-- Simulate creating booking.com database
SHOW DATABASES;
CREATE DATABASE booking_company;
USE booking_company;
SELECT DATABASE ();
SHOW CREATE DATABASE booking_company;
-- create guests table
CREATE TABLE guests (
id INT NOT NULL AUTO_INCREMENT,
@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 / .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 / .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 / 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 / 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