I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
access_key_id = ENV.fetch("APP_S3_ACCESS_KEY_ID") | |
secret_access_key = ENV.fetch("APP_S3_SECRET_ACCESS_KEY") | |
bucket_name = ENV.fetch("APP_S3_BUCKET") | |
s3 = AWS::S3.new(access_key_id: access_key_id, secret_access_key: secret_access_key) | |
bucket = s3.buckets[bucket_name] | |
object = bucket.objects["whatever/you/want"] | |
presign = AWS::S3::PresignV4.new(object) | |
presign.presign(:put, expires: 15.minutes.from_now.to_i) | |
# => #<URI::HTTP:0x007fcfcd97e1a0 URL:***stuff***> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/