master theorem – Proof of inequality $lceil x rceil le x+1$

The definition of $lceil x rceil$ is:

$lceil x rceil$ is the minimal integer $n$ such that $n geq x$.

(The existence of such an integer makes the reals an Archimedean field.)

Let us assume, for the sake of contradiction, that $lceil x rceil geq x + 1$. Then $lceil x rceil – 1 geq x$. Since $lceil x rceil – 1$ is also an integer, this contradicts the definition of $lceil x rceil$. Thus $lceil x rceil < x + 1$.

It is also easy to check that the inequality is tight, in the sense that $1$ cannot be replaced by any smaller $theta$. Indeed, if $theta = 1 – epsilon$ for $epsilon in (0,1)$, then $lceil epsilon rceil = 1 = epsilon + theta$.

dnd 5e – Would these adjustments to the ranger archetype Beast Master help the animal companion be more useful?

I recently playtested a Beast Master ranger from level 1 to level 20 (I was playtesting a new homebrew archetype, which was my primary reason for doing so; the Beast Master ranger was just one of the other party members), but there were a few things I noticed regarding the relative power of the beast companion itself. For reference, the beast I went with was a wolf, which is probably a fairly standard choice.

Issues

Now, I know that Beast Master rangers are infamously weak, but I still wanted to see if I could try to improve what I felt were some of its weakest points during my playtesting. I was already using the popular houserule of letting the ranger tell the beast to attack using a bonus action instead of an action, but the other things that bothered me were:

  • Relatively low HP (as the first linked Q&A points out), although this was more of a problem during Tier 1/2, less so during Tier 3/4, at least during my playtesting;
  • Hardly any hit die, which is related to the above problem, since I remember having to spend a lot of healing resources to keep bringing the wolf’s health back up to full/close to full;
  • The DC for resisting the knocked prone secondary effect from the wolf’s Bite attack remains pathetically low at DC 11 for the whole game.
  • The lack of any saving throw proficiencies really screwed the wolf over during the big finale where it died to a meteor swarm, but with a decent DEX saving throw bonus, it would probably have made it.
  • I was sometimes hesitant to use the wolf, because it was dropped to 0 HP a few times at lower levels, unless I knew it would probably land the killing blow or could avoid an opportunity attack or otherwise being hit.

I will point out that at higher levels, the AC was fairly decent (for a wolf), and the HP wasn’t as bad as it was at earlier levels, and I was impressed with the damage output thanks to attack rolls and damage scaling with the ranger’s proficiency bonus. Its Stealth and Perception skill bonuses were also impressive. These things I don’t feel the need to change.

Changes

Here are the changes I propose, somewhat inspired by the UA Sidekick rules:

  • You get a new hit die whenever you take another level in ranger, so at level 3 your wolf starts off with two hit die, but at level 4 they would have three hit die … by level 20 they have 19 hit die. I doubt this would make their max HP better than four times the ranger level, so it would only really be for the purposes of short resting.

  • To improve the max HP a little, maybe something as simple as adding the beast’s CON modifier to that, so it’s now:

    begin{align}
    text{ (ranger level + beasts’s CON modifier)} times 4
    end{align}

    This way, the animal’s toughness is also taken into an account; I feel like the wolf having 5 instead of 4 more HP each level would have been just enough to help, combined with more hie die to heal, but also from a flavour perspective, I feel like choosing a boar should end up tougher than a hawk, whereas RAW, they would both have the same HP. I would however, keep the minimum HP gained per level to 4, in case the beast somehow has a negative CON modifier, since I think taking HP away from the beast would be cruel, given how underpowered this whole archetype is.

  • Any DCs it has, such as the wolf’s ability to knock people prone, should scale with your proficiency bonus, like this AC and attack/damage rolls do, so rather than a measly 11, at level 3-4 it would be 13, and at level 5, it would be 14 … ending up at 18 at level 17+.

  • Unless it already has a “physical” saving throw proficiency (meaning STR, DEX or CON), it gains one of your choice at level 3, which of course would just mean a +2 (because that’s every valid animal companions’s proficiency bonus) but that also has your proficiency bonus added to it, like AC, etc. This would have certainly helped when it was hit by meteor swarm during our final level 20 showdown, it might have actually survived (even with its RAW hit points) had it made that DEX saving throw.

  • Finally, since I’m letting the beast be commanded as a bonus action, the first half of the 7th level ranger feature Exceptional Training is kinda wasted, so I was considering changing that to not only make the beast’s attacks magical, but also to effectively give the beast a rogue’s Cunning Action, which it can use if you command it to using the same bonus action you used to command it to attack (or do something else with its action). In short, you use one bonus action to tell it what to do with its turn, and it can now effectively use its action and bonus action to do something useful.

Question

Do the above changes seem reasonable, and do you foresee any balance issues coming from my proposed changes? My intention is for the Beast Master’s beast in particular to become more useful and survivable, without increasing its damage output (since I was happy with that), but not making it more powerful than I intended by overlooking something. I suppose also double checking whether there’s a problem with making some animals tougher than others based on their CON; does this unfairly favour tougher animals to the point where that’s a balance issue in and of itself?

google cloud platform – GKE master node upgrade constantly failing

I upgraded google cloud kubernetes cluster from 1.16.9-gke.2 to 1.16.9-gke.6 and it failed.

All cluster resources were brought up, but: component “kube-apiserver” from endpoint “gke-3a1fa906f95b728d035e-59bc” is unhealthy.

I’m having this issue constantly. My production server is completely inaccessible.
No way to roll back.
I had this issue before during the previous update. It resolved after 3-4 times. This time I update 6-7 times. No luck.

terminal – Applescript to Save csv attachments to folder then merge them tona master csv file

I’m getting compilation error with this. Could you look it over and give some insight please?

on perform_mail_action(ruleData)

-- The folder to save the attachments in (must already exist)
set attachmentsFolder to ((path to home folder as text) & "Documents:Attachments") as text

-- Save in a sub-folder based on the name of the rule in Mail
set subFolder to name of |Rule| of ruleData as text
tell application "Finder"
   if not (exists folder subFolder of folder attachmentsFolder) then
       make new folder at attachmentsFolder with properties {name:subFolder}
   end if

end tell

-- Get incoming messages that match the rule
tell application "Mail"
   set selectedMessages to |SelectedMessages| of ruleData
    repeat with theMessage in selectedMessages
       
        -- Get the date the message was sent
        set {year:y, month:m, day:d, hours:h, minutes:min} to theMessage's date sent
        set timeStamp to ("" & y & "-" & my pad(m as integer) & "-" & my pad(d) & "-" & my pad(h) & "-" & my pad(min))

        -- Save the attachment
        repeat with theAttachment in theMessage's mail attachments
           set originalName to name of theAttachment
            set savePath to attachmentsFolder & ":" & subFolder & ":" & timeStamp & " " & originalName
            try
               save theAttachment in savePath
           end try
       end repeat
   end repeat

end tell

end perform_mail_action

— Adds leading zeros to date components
on pad(n)
return text -2 thru -1 of (“00” & n)
end pad

— Merges the csv to a master file.
tell application “Finder”
if not (exists folder MasterFile of folder subFolder) then
make new folder at subFolder with properties {name:MasterFile}
end if
end tell

do shell script “cat attachmentsFolder & “:” & subFolder & “:” & timeStamp & ” ” & originalName > attachmentsFolder & “:” & subFolder & “:” & MasterFile & “:”Master.csv

release management – Is there justification for testing only master in an integration environment?

We have a series of environments; Let’s call them Development, Integration, Business and Production.

As a rule, we do not let master get deployed beyond Development, meaning any code which is to be tested by the business in the Integration or Business environments must have a pull request approved.

The problem arises when we want to test code in the Integration environment, for example, but cannot allow the code to be merged into master. Wanting to test in that environment might be for any number of reasons, including more Production-quality data, more data or more servers, etc.

This is, of course, a model which a lot of organisations follow, but I surmise that a different deployment path, which ends at Business and not Production would be a safe alternative for deployment of non-master code.

Is it wise to ensure that non-master branches never go beyond Development?

amazon rds – Replication external Master to RDS Slave: Connection issue

I am trying to set up replication between my external database (master) to an AWS RDS database (slave). Both are MySQL 5.6.

Please don’t mark this as a duplicate. I know others have asked a similar question, but the answers didn’t help me.

I am following the directions here https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.NonRDSRepl.html.

I have loaded the data from mysqldump.

I got the RDS IP address like this:

host <RDS ENDPOINT>

I created a replication user on the source, limited to RDS IP:

CREATE USER repl_user5@'<RDS IP>' IDENTIFIED BY 'password';
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'repl_user5'@'<RDS IP>' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

I also tried with a user that is not limited to any IP:

CREATE USER repl_user4@'%' IDENTIFIED BY 'password';
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'repl_user4'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

I also tried with a user that has 1.2.3.4 as IP (one I know will fail to connect).

I verified that I can access that @’%’ user from my own computer:

mysql -h <source IP> -P <source port> -u repl_user4 -p

I don’t know of an independant way to test that a MySQL user has access from the RDS.

I verified that I can access the RDS admin user from the source server. (Not sure if that’s even needed.)

I double-checked the users and grants, show grants, etc.

Source has server-id. Binlogs are created. This was set up before the dump was created and MySQL restarted.

I start replication like this:

CALL mysql.rds_set_external_master ('<source IP>', '<source port>', 'repl_user4', 'password', 'bin.000006', 120, 0);
CALL mysql.rds_start_replication;

When I try again (with a different user, for example), then I first stop it like this:

CALL mysql.rds_stop_replication;

I double-checked IP, password, user, port… many times.

ssl is disabled on the source (checked with SHOW GLOBAL VARIABLES LIKE ‘%ssl%’) so the issue isn’t the Master_SSL_Allowed = No setting on the RDS.

The result of SHOW SLAVE STATUS is the same regardless of which of the three users I try with. Slave_IO_Running is connecting and there is no listed error.

Slave_IO_State: Connecting to master
Master_Host: <my ip>
Master_User: <the user>
Master_Port: <my_port>
Connect_Retry: 60
Master_Log_File: bin.000006
Read_Master_Log_Pos: 120
Relay_Log_File: relaylog.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: bin.000006
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table: mysql.plugin,mysql.rds_monitor,mysql.rds_sysinfo,innodb_memcache.cache_policies,mysql.rds_history,innodb_memcache.config_options,mysql.rds_configuration,mysql.rds_replication_status
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 120
Relay_Log_Space: 286
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 0
Master_UUID:
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0

The RDS MySQL error log says the same regardless of which user I try with (the one with access to RDS IP, all IP, other IP)

2020-06-14 21:52:07 20197 (Note) Slave SQL thread initialized, starting replication in log 'bin.000006' at position 120, relay log '/rdsdbdata/log/relaylog/relaylog.000001' position: 4
2020-06-14 21:53:00 20197 (Note) Error reading relay log event: slave SQL thread was killed
2020-06-14 21:53:00 20197 (Note) Slave SQL thread exiting, replication stopped in log 'bin.000006' at position 120
2020-06-14 21:53:00 20197 (ERROR) Slave I/O: error connecting to master 'repl_user4@<source host>:<source port>' - retry-time: 60  retries: 1, Error_code: 2003
2020-06-14 21:53:00 20197 (Note) Slave I/O thread killed while connecting to master
2020-06-14 21:53:00 20197 (Note) Slave I/O thread exiting, read up to log 'bin.000006', position 120

dnd 5e – Does blink cause the attack of opportunity from Polearm Master?

Yes, an opportunity attack is triggered.

Although the blink spell does not explicitly use the word teleport, I believe that teleportation is essentially what it does.

Regarding teleportation the rules for how it works with opportunity attacks without polearm master are as follows:

You also don’t provoke an opportunity attack when you teleport or when someone or something moves you without using your movement, action, or reaction. (PHB p.195) (emphasis added).

So in normal circumstances it would be impossible to for a teleport to trigger an opportunity attack. However the pole arm master feat states:

While wielding a glaive, halberd, pike, or quarterstaff, other creatures provoke an opportunity attack from you when they enter your reach. (emphasis added).

Since teleporting into someones reach involves entering their reach we can assume that the perquisites for an opportunity attack via the pole arm master feat are met.

This interpretation of the rules relies on the belief that specific beats general and that the rules for a feat are more specific than the general rules regarding teleportation/opportunity attacks.

Manual TLS decryption with master secret

Assuming I have the master secret from SSLKEYLOGFILE client random, and server random, can I decrypt any tls traffic captured? I’ve started from Golang’s TLS implementation, pulled the connection stuff out, had it generate the keys and iv from the values above (https://github.com/golang/go/blob/cd18da451faedc4218a5fd0e38f9b3d13aa5da01/src/crypto/tls/prf.go#L121), but still can’t decrypt.

Thoughts? Is one able to generally decrypt any TLS (given correct version and cipher) with one instance implementation, like Golang’s?