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 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
#!/bin/bash | |
# To run you need to: | |
# * Have compiled mem_sim.c to mem_sim in the same folder | |
# * Have mem_trace.txt in the same folder as this script | |
# * Save the script as sums.sh | |
# * Run: chmod +x sums.sh | |
# * Run: ./sums.sh | |
declare -A checksums |
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
# just an example for me to remember | |
import urllib2, base64 | |
username = "testuser" | |
password = "changeme" | |
url = "https://example.com/" | |
request = urllib2.Request(url) | |
b64auth = base64.standard_b64encode("%s:%s" % (username,password)) | |
request.add_header("Authorization", "Basic %s" % b64auth) |