News for hackers. Stuff that matters.

simzor

Re:Ask HN: Can I see your scripts? on Monday August 15, 2022 @07:59AM (#32468551)
Thank you!!
Re:Ask HN: Can I see your scripts? on Monday August 15, 2022 @07:48AM (#32468464)
Makes operating AWS CLI against a user with MFA enabled easier

---------

#!/bin/sh

echo "Store and retrieve session token AWS STS \n\n"

# Get source profile read -p "Source Profile [<profile_name>]: " source_profile source_profile=${source_profile:-'<profile_name>'} echo $source_profile

# Get destination profile read -p "Destination Profile [<profile_name>-mfa]: " destination_profile destination_profile=${destination_profile:-'<profile_name>-mfa'} echo $destination_profile

mfa_serial_number='arn:aws:iam::<id>:mfa/<name>'

echo "\nOTP: " read -p "One Time Password (OTP): " otp

echo "\nOTP:" $otp echo "\n"

output=$(aws sts get-session-token --profile <profile_name> --serial-number $mfa_serial_number --output json --token-code $otp)

echo $output

access_key_id=$(echo $output | jq .Credentials.AccessKeyId | tr -d '"') secret_access_key=$(echo $output | jq .Credentials.SecretAccessKey | tr -d '"') session_token=$(echo $output | jq .Credentials.SessionToken | tr -d '"')

aws configure set aws_access_key_id $access_key_id --profile=$destination_profile aws configure set aws_secret_access_key $secret_access_key --profile=$destination_profile aws configure set aws_session_token $session_token --profile=$destination_profile

echo "Configured AWS for profile" $destination_profile

Re:GitHub Having Issues on Tuesday October 05, 2021 @10:34AM (#28760045)
Haha. To be fair GitHub has had a lot of issues that last few months though.
Re:You can buy Hacker News upvotes and comments on Monday June 21, 2021 @12:05PM (#27580501)
Is the server down due to HN traffic? :P
Re:Ask HN: Have you found a good desk chair? on Friday June 18, 2021 @05:15PM (#27555123)
When I first started working from home because of the pandemic, I had a IKEA Marcus chair, however, this soon was too bad of a chair to sit all day in, so I ended up investing in a Herman Miller Embody, and have not been looking back since. Great chair!
Re:Please provide feedback on my first website on Monday June 14, 2021 @06:20PM (#27509076)
First thing that came to mind is that you should set a max width of the content container. For those of us that have a ultrawide for example, it can become hard to read when the content spans the entire screen.
Re:AWS Frankfurt incident on Friday June 11, 2021 @05:27AM (#27471040)
I like that idea :D
Re:AWS Frankfurt incident on Thursday June 10, 2021 @06:42PM (#27466843)
This reminds me that we should get ChaosMonkey up and running. :D
Re:Tell HN: GitHub is having issues with PRs on Wednesday June 02, 2021 @04:37AM (#27366352)
Are they also having issues with Webhooks and/or pushes? Had some slowdowns for pushes, and webhooks does not seem to be triggering.
This looks great. Is there something similar that supports PHP?
Re:Bringing the print statement back on Tuesday July 14, 2020 @05:17PM (#23838041)
Hate the idea to be honest. In my opinion this will just bloat the language, no need. Rather avoid the hundreds of different standards like PHP.
As Zoom now owns Keybase, I am really worried about the future of Keybase, especially after statements like these.

This also makes none or very little sense - if this is actually just to cooperate with law enforcement, why would encrypting corporate (or paying) calls be any better, the bad people that are referred to in the statement could just get a paid plan?

Re:Notion for everyone on Tuesday May 19, 2020 @02:51PM (#23238622)
Such a great tool - so glad I gave it a shot, which made me fall in love with it.
Re:Coming to Chrome: a new way to use tabs on Thursday May 14, 2020 @05:01AM (#23177193)
This is great. With this comes to Firefox. I guess Firefox has a kind of similar feature (Containers), but this new Chrome feature looks way nicer, even though it might not have containerization.
Can't stress this enough!
Insomnia is great. This will be a great addition! However, it annoys me that the image showing the tool is not zoomable or clickable, so you can barely see what it's showing.
Re:Show HN: Free foreign exchange rates API on Saturday April 25, 2020 @03:24PM (#22980619)
Great work. Love the landing page!
Re:Show HN: Online Town – A better way to gather online on Saturday April 11, 2020 @07:22AM (#22841093)
2D VR-Chat with a cam! Really cool stuff :)