This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def method_one(&block) | |
puts "method_one" | |
block.call | |
end | |
def method_two(&block) | |
puts "method_two" | |
block.call | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
How do I publish content to LBRY?
Convert to 720p with 5M bitrate:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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|" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
k8s-app: deployments-gc | |
name: deployments-gc | |
namespace: staging |
curl https://gist.githubusercontent.com/miry/612aea5b9887c8aad18f9a1d271093b6/raw/178f1f1c916f9baf8af1a1b361f6d49e502a708f/firefox_install.sh | bash
Use ALT+C
, ALT+V
, ALT+W
for shortkeys https://askubuntu.com/questions/39462/how-do-i-reconfigure-keyboard-shortcuts-for-copy-and-paste
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |