Skip to content

Instantly share code, notes, and snippets.

@Phoenix124
Phoenix124 / sql.sql
Created January 22, 2021 10:11
Stepik sql source
1.1.6
create table book (book_id int primary key auto_increment, title varchar(50), author varchar(30), price decimal(8,2),
amount int);
1.1.7
insert into book (book_id, title, author, price, amount) values (1, "Мастер и Маргарита", "Булгаков М.А.",
670.99, 3)
1.1.8
insert into book (book_id, title, author, price, amount) values (2, "Белая гвардия", "Булгаков М.А.",
@Phoenix124
Phoenix124 / clear_maven.sh
Created September 27, 2021 14:54
Remove old maven dependencies
find ~/.m2/repository/ -atime +30 -iname '*.pom' -print0 | while read -d '' -r pom; do echo rm -rf "$(dirname $pom)"; done
@Phoenix124
Phoenix124 / squash.sh
Created November 16, 2021 10:29
Squash commits in branch
git merge-base HEAD BRANCH_YOU_BRANCHED_FROM
git reset --soft COMMIT_HASH
git commit -am 'This is the new re-created one commit'