-
Determine the MacBook model
https://support.apple.com/en-us/HT201300
Depending on the model and the hardware present, certain things might not work properly or at all. For example on my 2013 MBA there are no available drivers for the webcam.
I hereby claim:
- I am alexeyzab on github.
- I am alexeyzab (https://keybase.io/alexeyzab) on keybase.
- I have a public key whose fingerprint is C860 5FF1 F6DC 19D6 3A0A 54C2 3A16 9985 4783 24E9
To claim this, I am signing this object:
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 caesar_cipher(input, shift) | |
positions = input.unpack("C*") | |
shifted_positions = positions.map do |pos| | |
case pos | |
when (65..90), (97..122) | |
shifted = pos + (shift % 26) | |
if (shifted > 90 && shifted < 97) || (shifted > 122) | |
shifted = shifted - 26 | |
end | |
pos = shifted |