This file contains 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
import requests | |
response = requests.get('https://api.ipify.org?format=json') | |
print(response.text) |
This file contains 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
# This is an alternative to ngrok. Provided you have a server that is exposed to internet traffic. Gives you a personal domain to reach your program. | |
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.bind(('0.0.0.0', 8080)) | |
s.listen(5) | |
while True: |
This file contains 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 readline = require('readline'); | |
var passwordsLog = { }; | |
function addLoginField(loginField, password) { | |
passwordsLog[loginField] = { }; | |
var date = new Date(); | |
date.toLocaleDateString("en-IN"); | |
passwordsLog[loginField].password = date; |
This file contains 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
# This script allows you to download all of your GitHub projects. | |
import requests | |
import os | |
username = raw_input('Enter username: ') | |
projects = requests.get('http://api.github.com/users/' + username + '/repos') | |
projects = projects.json() | |
for project in projects: |
This file contains 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
import os | |
import traceback | |
def traverse_directory(directories): | |
try: | |
for directory in directories: | |
if os.path.isdir(directory): | |
new_directories = os.listdir(directory) | |
for new_directory in new_directories: |