Skip to content

Instantly share code, notes, and snippets.

View miry's full-sized avatar

Michael Nikitochkin miry

View GitHub Profile
@miry
miry / README.org
Last active November 13, 2020 11:51
Spacemacs layer OSX fast open file by name to add CMD+P to find a file by name
def method_one(&block)
puts "method_one"
block.call
end
def method_two(&block)
puts "method_two"
block.call
end
#!/usr/bin/env bash
medup -u miry -d ./posts/miry # Articles written by miry
medup --platform=devto -u miry -d ./posts/miry_devto # Articles written by miry in Dev.to
medup @miry -d ./posts/miry # Alternative way to get articles written by miry
medup -u miry -d ./posts/favorites -r # Favorite articles of miry (clapped one)
medup -u miry -d ./posts/miry --update # Update existing exported posts with latest versions of posts
medup -u miry -d ./posts/miry --assets-images # Save images to assets folder
medup @miry -d ./posts/miry --assets-images --assets-dir ./assets --assets-base-path=/assets # Save images to assets folder and update base path from relative to absolute
medup -p jetthoughts -d ./posts/jetthoughts # Export Jetthought publication's posts
@miry
miry / MOVIE COMPRESSION.md
Last active December 19, 2022 18:04
Automate compressing of video files from GoPro
@miry
miry / 01_dynamodb_get_all.rb
Last active September 30, 2022 02:53
Sample to get all items from DynamoDB table
# frozen_string_literal: true
require 'aws-sdk-dynamodb'
require 'hirb'
# NOTICE: Authorize via https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
dynamodb = Aws::DynamoDB::Client.new
scan_opts = { table_name: '<TABLE_NAME>' }
items = []
# Insert in the string `id: :integer` option any place after first argument, only if it is not specified
# Example without :id option provided
"create_table "cr_bandit_parameters", primary_key: "parameter", force: :cascade do |t|" =>
"create_table "cr_bandit_parameters", primary_key: "parameter", force: :cascade, id: :integer do |t|"
# Example should not be changed because it has id: false
"create_table "cr_bandit_parameters", primary_key: "parameter", id: false, force: :cascade do |t|" =>
"create_table "cr_bandit_parameters", primary_key: "parameter", id: false, force: :cascade do |t|"
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: deployments-gc
name: deployments-gc
namespace: staging
@miry
miry / checklist.md
Last active January 6, 2021 17:34
How to check a new apartment in Neubau

Preparation

  • Electricity indicator
  • Flashlight

Check

  • Main door: lockers: как ходит, закрывается, и все задвижки работают
  • Main door: position: Door should be open on 45 degree and it does not move
  • Main door: there should not be luft when door is closed. Try to pull/push multiple times
@miry
miry / FIREFOX.md
Last active January 9, 2020 20:04
Linux: Install or upgrade firefox developer edition.
# frozen_string_literal: true
def print_threads
puts '>> print_threads'
Thread.list.each do |thread|
p thread
puts "Thread TID-#{(thread.object_id ^ ::Process.pid).to_s(36)} #{thread['label']}"
if thread.backtrace
puts thread.backtrace.join("\n")
else