Skip to content

Instantly share code, notes, and snippets.

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

Michael Voropaiev mvoropaiev

🏠
Working from home
  • Kyiv, Ukraine
View GitHub Profile
# THE ULTIMATE V60 TECHNIQUE
# Brew ratio: 60 g/L (e.g. 30 g per 500 mL)
# Grind size: medium fine
# Temperature: the hotter, the better (especially with lighter roasts)
# 30g / 500ml example:
#
# timer: | 0:00 | | 0:45 | 1:15 | 1:45 | 3:30 |
@mvoropaiev
mvoropaiev / delete_git_submodule.md
Last active October 14, 2019 14:49 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule <name>"
  • Delete the now untracked submodule files rm -rf path_to_submodule
#!/usr/bin/env bash
set -ex
# fetch latest version
curl https://www.micu.eu/adblock/adblock.php >./adblock.rsc
cat adblock.rsc | grep -v 'add address' | grep -v 'ip dns static'
read -n 1 -s -r -p "Press any key to continue"
# copy and import file
:profile start profile.log
:profile func *
:profile file *
" at this point do slow actions
:profile pause
:noautocmd qall!
#!/bin/sh
export CI=true
CI_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)
export CI_ACCOUNT_ID
CI_GIT_BRANCH="$(git symbolic-ref HEAD --short 2>/dev/null)"
export CI_GIT_BRANCH
if [ "$CI_GIT_BRANCH" = "" ]; then
-- start
tell application "System Events"
keystroke "]" using {control down, option down}
end tell
tell application "JustFocus"
launch
start pomodoro
end tell
-- stop
@mvoropaiev
mvoropaiev / google_play_verification.rb
Created October 27, 2018 16:16 — forked from jkotchoff/google_play_verification.rb
Verifying an Android subscription in a Ruby on Rails app using the Google Play API
class GooglePlayVerification
require 'google/api_client'
# Refer:
# https://code.google.com/p/google-api-ruby-client/issues/detail?id=72
# and
# http://jonathanotto.com/blog/google_oauth2_api_quick_tutorial.html
# and
# http://milancermak.wordpress.com/2012/08/24/server-side-verification-of-google-play-subsc/
GOOGLE_KEY = 'xxx-xxx.apps.googleusercontent.com'
#!/usr/bin/env bash
aws ssm get-parameters --names /aws/service/ecs/optimized-ami/amazon-linux/recommended --region us-east-1 | jq -r '.Parameters[0].Value | fromjson.image_id'
# iterm2 shell integration is required
it2toucbar_status() {
msg="${PWD##*/}"
branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
[[ -n "$branch" ]] && msg+=": $branch"
echo "$msg"
}
[[ $PROMPT_COMMAND != *"it2toucbar_status"* ]] && PROMPT_COMMAND+='it2setkeylabel set status "$(it2toucbar_status)"'

Keybase proof

I hereby claim:

  • I am mvoropaiev on github.
  • I am mvoropaiev (https://keybase.io/mvoropaiev) on keybase.
  • I have a public key ASBwNxONp-LiS7_8Fd2xnBcZ2EXky6DlUoMMK0a4AjiK7Qo

To claim this, I am signing this object: