Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| irb(main):001:0> h = {} | |
| => {} | |
| irb(main):002:0> a = [1, 2, 3] | |
| => [1, 2, 3] | |
| irb(main):003:0> h[a] = 5 | |
| => 5 | |
| irb(main):004:0> h | |
| => {[1, 2, 3]=>5} | |
| irb(main):005:0> h[[1, 2, 3]] | |
| => 5 |
| #!/usr/bin/python | |
| # | |
| # This script fetches the current open tabs in all Safari windows. | |
| # Useful to run remotely on your mac when you are at work and want | |
| # to read a page you have open (remotely) at home but don't remember | |
| # the url but can log in to your home system on the cmmand line | |
| # | |
| import sys |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000