Skip to content

Instantly share code, notes, and snippets.

View 2pravin7's full-sized avatar
🤷‍♂️
ZzzZzzz

Pravin 2pravin7

🤷‍♂️
ZzzZzzz
View GitHub Profile
@JCotton1123
JCotton1123 / export.sh
Last active July 2, 2024 20:16
AWS Export IP Addresses
# Export IP addresses to support vulnerability scanning
# Public IPs
touch /tmp/public-ips.txt
aws ec2 describe-instances \
--query "Reservations[*].Instances[*].PublicIpAddress" \
--output=text \
>>/tmp/public-ips.txt
@plembo
plembo / add-search-domain-nm-ubuntu.md
Last active November 18, 2024 08:51
Add search domain under Ubuntu 18.04 LTS and later NetworkManager

Add a search domain under NetworkManager on Ubuntu Desktop 18.04 LTS and later (ipv4)

In older versions of the NetworkManager gui there was a field for the search domain to be written into /etc/resolv.conf, but it was dropped by the time Ubuntu 18.04 LTS shipped. You can add it by editing the system-connections file directly, but running the appropriate nmcli commands is the right way to do it. Note that Ubuntu Server 18.04, which use netplan and systemd-networkd by default, is completely different. Ubuntu 20.04 involves even more variation (see comments below). It's enough to drive someone to Debian proper...

Basic wired networking

First, get the name of the interface you want to set a search domain on:

$ nmcli con show
@JacobJohansen
JacobJohansen / AuthyToOtherAuthenticator.md
Created October 20, 2017 15:12 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 28, 2025 19:21 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@loziju
loziju / macosx-configure-postfix-as-relay.md
Last active April 4, 2025 12:03
Configure postfix as relay for OS X