- Download the script
- Put this file in the same folder as your videos
- Run:
ruby optimize_video.rb
, for help, useruby optimize_video.rb --help
This file contains hidden or 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 itob(number) | |
decimals = [] | |
while (number.positive?) | |
number, remainder = number.divmod(2) | |
decimals << remainder | |
end | |
bits = decimals.length.times.map { |i| 2**i } | |
validate_sum = 0 |
Can you crack the secret message hidden within this cipher? I've taken a phrase and encoded it into a string of words that look like "meatball". It's a bit tricky, but I believe in your skills!
Cipher Text:
mEaTbALLmEAtBALLmEATbALL, mEATBalLmEAtBALLmEATbAlL mEAtbalLmEATbaLlmEAtbAlL mEATbaLLmEATbAlLmEATballmEAtbAlLmEATbaLl mEATbaLLmEAtBAlLmEAtbalLmEATbaLlmEATbAll! mEaTbALLmEAtbalLmEAtBALlmEATbAll mEAtbalL mEAtBaLlmEAtBALLmEAtbaLl? mEaTbALLmEAtbAlL'mEATbaLlmEAtbAlL mEAtBallmEAtBalLmEATbaLlmEAtBalLmEAtBALlmEAtbALL: mEAtbalLmEAtBALlmEAtbAllmEATbaLlmEAtbAlLmEATbALL@mEAtbaLlmEAtbAlLmEATbAllmEATbALLmEAtBalLmEATBallmEATbAllmEAtBAllmEAtbalLmEAtbaLlmEATbaLL.mEAtbaLLmEAtBALLmEAtBAlL
This file contains hidden or 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
certutil -hashfile something.zip SHA256 |
This file contains hidden or 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
install: --no-rdoc --no-ri |
This file contains hidden or 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
// Javascript nullish coalescing operator | |
// Is set to 0 | |
let x = 0 ?? "hello" | |
// Is set to goodbye | |
let y = undefined ?? "goodbye" | |
// Is set to hello | |
let z = null ?? "hello" |
This file contains hidden or 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
pictures = Proc.new { |file| file.match(/(png|jpeg|jpg)/) } | |
Dir.entries('.').select &pictures | |
=> ["image1.png", "image2.png", "pic.jpg", "picture.jpeg"] |
This file contains hidden or 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
# &, optional chainig | |
[1,2,3,4,5,6][5]&.to_s | |
=> "6" | |
[1,2,3,4,5,6][6]&.to_s | |
=> nil | |
# &, map shorthand notation | |
to_s = Proc.new { |x| x.to_s } | |
=> #<Proc:0x00000001065bdef0 (irb):8> | |
[1,2,3].map &to_s |