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
| #!/usr/bin/python3 | |
| from http.server import BaseHTTPRequestHandler, HTTPServer | |
| from urllib.parse import urlparse, parse_qs | |
| import json | |
| HOST_NAME = "" | |
| HOST_PORT = 4000 | |
| WRITE_SUCCESS_TEMPLATE = "Key '{}' now storing value '{}'" | |
| WRITE_FAILURE_TEMPLATE = "Unable to store key '{}' and value '{}'" |
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
| class Node(): | |
| def __init__(self, name): | |
| self.name = name | |
| self.children = None | |
| def depth_first_search(start_node, name): | |
| print("Evaluating node: {}".format(start_node.name)) | |
| if start_node.name == name: | |
| return start_node | |
| elif start_node.children: |
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
| -- TerminalVim.app | |
| -- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm | |
| -- To use this script: | |
| -- 1. Open Automator and create a new Application | |
| -- 2. Add the "Run Applescript" action | |
| -- 3. Paste this script into the Run Applescript section | |
| -- 4. Save the application as TerminalVim.app in your Applications folder | |
| -- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default |