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
#!/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'
@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'
-- start
tell application "System Events"
keystroke "]" using {control down, option down}
end tell
tell application "JustFocus"
launch
start pomodoro
end tell
-- stop
#!/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
:profile start profile.log
:profile func *
:profile file *
" at this point do slow actions
:profile pause
:noautocmd qall!
#!/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
@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
# 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 |