Skip to content

Instantly share code, notes, and snippets.

@bigsolom
bigsolom / Install.md
Last active April 15, 2023 14:54
sdkman fish
@bigsolom
bigsolom / commands.sh
Last active March 29, 2023 08:40
iTerm + Fish + tmux for mac
#- iTerm
# https://iterm2.com/
# iterm2 colors gallery: https://iterm2colorschemes.com
# save the color scheme you want as XXXX.itermcolors
# Import the color scheme(s) you wish
# Settings -> Profiles -> Default -> colors -> Color Presets -> Import...
#- Fish
brew install fish
@bigsolom
bigsolom / gist:76a6a9d6fcf222d57ff96344baaa69c2
Last active April 4, 2022 10:38
Install node using n node version manager with fish shell
brew install n
mkdir ~/n
set -xg N_PREFIX ~/n/
fish_add_path ~/n/bin/ # fish 3.2.0
n lts
n
node -v
@bigsolom
bigsolom / .gitconfig
Last active October 4, 2023 08:33
Configurationm
[core]
editor = vim
[color]
# Enable colors in color-supporting terminals
ui = auto
[color "diff"]
frag = cyan
new = green
commit = yellow
[color "branch"]
@bigsolom
bigsolom / knee_excercises.md
Last active September 20, 2019 13:08
Knee Excercises

Home Exercises

Foam roller

There are other brands as well and you can buy it on Amazon, the Blackroll "Med" is softer than the standard one which is good for a start, as the harder one will be too painful and it can lead to you quitting it all together

The main use of the roll is that you stretch the Fascia band in your legs which allows you to use your muscles more and release the stress on the knee, you can google for more info about Fascia band

docker volume create mysql_5_7
docker run -d --name=mysql_5_7 -e MYSQL_ROOT_PASSWORD=root1234 -p 3306:3306 -v mysql_5_7:/var/lib/mysql mysql:5.7 --sql-mode=""
docker run --name memcached -p 11211:11211 -d memcached
@bigsolom
bigsolom / commands.sh
Created February 22, 2019 10:10
clearing up files/folders
# listing directories with the largest size
du -hs */ | sort -hr
# deleting files in a directory with lots of files
ls -p| head -10000 | xargs rm --
#deleting folders in directory with lots of folders
ls -p| head -10000 | xargs rm -rf --
# Docker setup
docker volume create postgres_volume
docker run --name pg-docker -d -p 5432:5432 -v postgres_volume:/var/lib/postgresql/data -e POSTGRES_PASSWORD=docker postgres
docker exec -it pg-docker bash
su - postgres
psql
create role my-app with createdb login password 'password';
#in database.yml
host: 0.0.0.0
@bigsolom
bigsolom / elastic_commands.sh
Created August 17, 2016 08:59
Elastic Search
#List all indices:
curl 'localhost:9200/_cat/indices?v'
#List all aliases:
curl 'localhost:9200/_cat/aliases?v'
#Delete an index
curl -XDELETE 'http://localhost:9200/index_name/'
@bigsolom
bigsolom / shell.sh
Last active February 20, 2017 13:12
Useful Commands
#Find a file in directory and sort by date modified (logs updated for example)
find ./ -name "file_name" -printf "%T+\t%p\n" | sort -r
#Monitor the HTTP requests coming out of shell
tcpflow -p -c -i en0 port 80 | grep -oE '(GET|POST|HEAD) .* HTTP/1.[01]|Host: .*'
#or
httpry -i en0