Skip to content

Instantly share code, notes, and snippets.

View levpa's full-sized avatar
🏠
Working from home

Lev Pasichnyi levpa

🏠
Working from home
View GitHub Profile
[user]
name = Name Surname
email = [email protected]
[core]
editor = code --wait
[push]
autoSetupRemote = true
# Enable Powerlevel10k instant prompt.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export ZSH="$HOME/.oh-my-zsh"
export PATH="/opt/homebrew/bin:$PATH"
export PAGER="less"
export LESS="-FXR"
@levpa
levpa / settings.json
Last active July 3, 2024 11:06
Visual Studio Code settings
{
"files.autoSave": "afterDelay",
"explorer.confirmDelete": false,
"git.autofetch": true,
"terminal.external.osxExec": "iTerm.app",
"terminal.explorerKind": "external",
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.fontFamily": "MesloLGS NF",
"workbench.colorTheme": "Default Dark+",
"redhat.telemetry.enabled": false,
@levpa
levpa / settings.json
Last active August 3, 2024 10:46
Terrafrom autoformat in VS Code
// As a first step: install extensions Prettier and Hashicorp Terraform
// update json user_config in VS Code
{
"terminal.integrated.enableMultiLinePasteWarning": "never",
"git.autofetch": true,
"explorer.confirmDragAndDrop": false,
"git.confirmSync": false,
"files.exclude": {
"**/.terraform": true,
"**/.terraform.lock.hcl": true
@levpa
levpa / .bashrc
Last active October 7, 2024 12:17
WSL2 Bash config with branch coloring
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
@levpa
levpa / docker.ps1
Last active September 24, 2024 15:20
How to setup docker on windows without docker desktop
# download docker and dockerd from here: https://download.docker.com/win/static/stable/x86_64/
New-LocalGroup -Name 'docker-users' -Description 'docker Users Group'
Add-LocalGroupMember -Group 'Administrators' -Member ('docker-users') –Verbose
Add-LocalGroupMember -Group 'docker-users' -Member ('your-win-username','Administrators') –Verbose
# also install buildx https://github.com/docker/buildx
# and run teminal or VS Code with admin rights
@levpa
levpa / install.sh
Created October 6, 2024 21:28
WSL2 Ubuntu 24.04 SW install
#!/bin/bash
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt update && sudo apt upgrade -y
sudo apt install git -y && git --version
sudo snap install go hugo dart-sass
@levpa
levpa / .bash_aliases
Created October 7, 2024 12:18
Aliases for .bashrc file, checked on executing
# aliases for devops tools
alias tf='terraform'
alias k='kubectl'
alias h='helm'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
@levpa
levpa / cs50.sh
Last active October 28, 2024 12:39
CS50 course WSL clang setup
# install make and clang
sudo apt install make clang
# cs50.h library install
curl -s https://packagecloud.io/install/repositories/cs50/repo/script.deb.sh | sudo bash
sudo apt install libcs50
# put this into ~/.bashrc
export CC="clang"
export CFLAGS=""