Skip to content

Instantly share code, notes, and snippets.

View dimasch's full-sized avatar

Dmitry Schegolihin dimasch

View GitHub Profile
@dimasch
dimasch / redis-clear
Last active November 4, 2024 14:41
Clear a redis cache in Docker
docker exec -it container-name redis-cli FLUSHALL
@dimasch
dimasch / cleanup-branches
Last active August 15, 2018 16:54
Cleanup Old Git Branches
git branch -r --merged | grep -e 'BRANCH_NAME' | sed 's/origin\//:/' | xargs -n 1 git push origin
@dimasch
dimasch / plural.js
Created June 30, 2017 05:46 — forked from tomfun/plural.js
JavaScript russian plural function
function getNoun(number, one, two, five) {
let n = Math.abs(number);
n %= 100;
if (n >= 5 && n <= 20) {
return five;
}
n %= 10;
if (n === 1) {
return one;
}
@dimasch
dimasch / README.md
Last active August 17, 2021 07:49
The Zendesk integration for Vue Storefront
@dimasch
dimasch / gist:56020be0ebf5e58d8c58cc5538ccc144
Created September 19, 2023 18:01
Change the default screenshot file name on the MacOSX.
defaults write com.apple.screencapture name "$(date +%Y-%m-%d) $(date +%H.%M.%S)";
defaults write com.apple.screencapture "include-date" 0; killall SystemUIServer;