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
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
Google::Cloud::Logging::Logger.class_eval do | |
%i{ debug info warn error }.each do |level| | |
old = instance_method level | |
define_method level do |message, entry_labels = {}, &block| | |
logger_labels = @labels if @labels | |
begin | |
@labels = (@labels || {}).merge entry_labels | |
old.bind(self).(message, &block) | |
ensure |
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
log on | |
hostname "Nakilon CS:GO old de_dust2 Dedicated Server" | |
rcon_password ***** | |
host_info_show 2 | |
host_players_show 2 | |
exec banned_user.cfg | |
exec banned_ip.cfg |
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
void titanium() { | |
object o; | |
while (null == (o = radar(TitaniumOre, 0, 360, 0, 30))) wait(0.1); | |
goto(o.position); | |
grab(); | |
goto(radar(Converter, 0, 360, 0, 20).position); | |
drop(); | |
move(-2); | |
} |
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
screen -x workshop | |
steamcmd +login anonymous +workshop_download_item 282440 539421606 +quit | |
screen -x server | |
QLDS_RCON_PASS=... QLDS_STATS_PASS=... ./run.sh 0 | |
steam@ql:~$ tree qlds_fs_homepath/27960/ | |
qlds_fs_homepath/27960/ | |
└── baseq3 | |
├── access.txt |
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 AAAAB3NzaC1yc2EAAAADAQABAAABAQCyqfb/JsmNKlCSCC9F+VhG0tsxHhGEMMIyjpenIX97cPKjC6SL1S0APoxta7YdHgOYwOD76n3VuJoOSAcQ0FeY6i+PmONnrfAXFrpknyr1e6FwWyNQACZj+df7nowLy8l5AmLpy2U8gd6zpCN/0SPaeyxLcouBNgEU+AfItsJqg8dN2pMsJAH5eGAflWqBlPUhRlqXhxQHTrY2WAbiHoxrSj9becaWa3aL8k2wTS3TVpGQGAgzNYNa4bSrm70mPJvUvReP13KymfJkKoRv/7ZgQBCD7pHDf0tu0kwh0CE4RvsydARHbsKIYeZh70v7YYBGZ48tvOqov9A6ztQ1u9YR nakilon@gmail.com |
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 "bundler/inline" | |
gemfile do | |
source :rubygems | |
gem "pcbr" | |
end | |
require "open-uri" | |
require "csv" | |
happy, cursing = %w{ happy cursing }.map do |filename| | |
CSV.parse( |
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
blocks = Hash[ File.read("blocks.xml").scan(/<block .*?<\/block>/m).each_with_object({}){ |m, h| | |
xml = Nokogiri::XML m | |
if mat = xml.at("[name=Material]") | |
h[xml.root[:name]] = mat[:value] | |
elsif ext = xml.at("[name=Extends]") | |
h[xml.root[:name]] = ->{ h.fetch ext[:value] } | |
end | |
}.map{ |k, v| [k, MLL::nest_while[v, ->_{ _.call }, ->_{ _.respond_to? :call }]] rescue nil }.compact. | |
group_by(&:last).map{ |mat, g| [mat, g.map(&:first)] } ] | |
fail unless blocks.values.flatten.include? "woodCatwalkRailing2" |
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 |