-
настроить все в System Preferences, например
- выключить Correct spelling automatically
- инвертировать кнопку Fn
- поставить раскладки "США" (на новых макбуках тильды будет слева внизу) и "Русская - ПК"
-
выключить ускорение указателя трекпада и перелогиниться
defaults write .GlobalPreferences com.apple.trackpad.scaling -1
-
настроить Finder (войти в настройки любой программы в Mac OS можно комбинацией
⌘,
)
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
require "google/cloud/monitoring/v3/metric_service_client" | |
client = Google::Cloud::Monitoring::V3::MetricServiceClient.new | |
project_path = Google::Cloud::Monitoring::V3::MetricServiceClient.project_path JSON.load(File.read ENV["GOOGLE_APPLICATION_CREDENTIALS"])["project_id"] | |
create_custom_gauge_metric = lambda do |type, display_name, value_type, labels = {}| | |
metric_descriptor = Google::Api::MetricDescriptor.new( # googleapis-common-protos-1.3.5/lib/google/api/metric_pb.rb | |
type: "custom.googleapis.com/#{type}", | |
metric_kind: :GAUGE, # google-cloud-monitoring-0.24.0/lib/google/cloud/monitoring/v3/doc/google/api/metric.rb | |
value_type: value_type, # google-cloud-monitoring-0.24.0/lib/google/cloud/monitoring/v3/doc/google/api/metric.rb | |
display_name: display_name, |
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
ENV["GCLOUD_KEYFILE"] = "./key.json" | |
require "gcloud" | |
GV = Gcloud.new("my_app").vision | |
GV.annotate( | |
GV.image("./google_vision/temp.jpg"), | |
labels: true, | |
).gapi.to_h | |
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
# either run it in irb or .join some thread to prevent program exit | |
i = 0 | |
Thread.new do | |
puts i while sleep 1 | |
end | |
Thread.new do | |
loop{ i += 1 } | |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKOJygfeqxk6yVuQdEdarz7BRtYKOa15NpzVhWdt9BltQY3y9R74UpEbYAd3/C3Fax+mQp4kJy7eBO4wxRBUl0/EIkMq691dwAajLK3U0nZylWRZDUjNpXMhZ8W1W95xv3/Li3o4ssi3Ns9Dkny7/aQOVPl/ggUFIG4jVebkxcv0b0b84Aq6jEGwIV8Og1Ps2FjoHvUw1SlAoNj2wRQfMW6BzbzOkyCeTwzl7gk2D1f8XysyY0WeJGQn3m3WnTAY8oSDLCCSzUNbP/swekdGf5j9M3ldhlf9OJb39/aq+dYCDItteu/KQj5av8btn4ntmv8Gf+y5O+n3AuXD7VQwh7 nakilon@nakibook.local |
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
source "https://rubygems.org" | |
gem "net_http_utils", ?0, gist: "97549ceb58d21e1fcbc0e6cdaf92fce8" | |
gem "nokogiri" | |
gem "byebug" |
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
Gem::Specification.new do |spec| | |
spec.name = "net_http_utils" | |
spec.summary = ?? | |
spec.version = "0.2" | |
spec.author = "Victor Maslov" | |
spec.files = %w{ net_http_utils.rb } | |
spec.require_path = "." | |
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
‐=!ϐ=ʚ=‐ | |
ʚ.define_singleton_method(:<<){|∣|@∣=∣} | |
ʚ.define_singleton_method(:-){|∣|∣ if-1<@∣-=1} | |
ʚ << 4 | |
until ϐ==ʚ-‐ | |
puts "he" | |
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
$ ruby recipes.rb Automato Avesmingo Banana Carrot Cocoa\ Pod Corn Currentcorn Grapes Pearlpeas Pineapple Potato Rice Tomato Wheat Sugar Beakseed | |
1 automatostew = 1 Wheat + 1 Currentcorn + 1 Automato | |
1 2kbpotage = 1 Currentcorn + 1 Automato | |
1 candyautomato = 1 Sugar + 1 Automato | |
1 avesmingojuice = 1 Avesmingo | |
1 apegrapes = 1 Grapes + 1 Banana | |
1 batteredbanana = 1 Wheat + 1 Banana | |
1 luckydip = 1 Carrot + 1 Banana | |
1 roastedcarrot = 1 Carrot | |
1 carrotjuice = 1 Carrot |
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
$ ruby recipes.rb Carrot Potato Bandage | |
1 roastedcarrot = 1 Carrot | |
1 carrotjuice = 1 Carrot | |
1 bakedpotato = 1 Potato | |
1 mashedpotato = 1 Potato | |
1 potatogrids = 2 Mashed Potato | |
By default all consumables are assumed to: | |
1) WellFed you | |
2) be blocked if you are WellFed already | |
3) Heal in 60 seconds |