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
| const timer = ms => new Promise(res => setTimeout(res, ms)); | |
| // Unretweet normally | |
| const unretweetTweet = async (tweet) => { | |
| // Unlike liked tweet | |
| if (tweet.querySelector('div[data-testid="unlike"]') != null) { | |
| await tweet.querySelector('div[data-testid="unlike"]').click(); | |
| await timer(250); | |
| } | |
| await tweet.querySelector('div[data-testid="unretweet"]').click(); |
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
| #include <ifaddrs.h> | |
| // http://stackoverflow.com/questions/25626117/how-to-get-ip-address-in-swift | |
| func getIFAddresses() -> [String] { | |
| var addresses = [String]() | |
| // Get list of all interfaces on the local machine: | |
| var ifaddr : UnsafeMutablePointer<ifaddrs> = nil | |
| if getifaddrs(&ifaddr) == 0 { | |