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
| """ | |
| A little demo of some of the quirks of Python "closures" with inner functions. | |
| Function closures allow a function to access nonlocal variables in the | |
| enclosing scope, even when invoked outside it's immediate lexical scope. | |
| In languages centered around mutable data types, you would expect to be | |
| able to mutate nonlocals in a closure. | |
| MDN has an excellent rundown of closures, with examples in Javascript. | |
| https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures |
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
| --- | |
| # Do this? | |
| - name: create droplet 512MB/Centos 7/Region NYC2 | |
| digital_ocean: > | |
| command=droplet | |
| state=present | |
| name={{ droplet_name }} | |
| client_id={{ client_id }} | |
| api_key={{ api_key }} | |
| size_id=66 |
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
| FROM tianon/centos:5.8 | |
| RUN yum install -y curl tar gcc make xz | |
| RUN mkdir /usr/src/python | |
| WORKDIR /usr/src/python | |
| RUN curl -Sl "https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz" > Python-2.7.8.tar.xz | |
| RUN xz -dc < Python-2.7.8.tar.xz > Python-2.7.8.tar | |
| RUN tar -xvf Python-2.7.8.tar -C /usr/src/python --strip-components=1 | |
| # You may want to verify the download with gpg: https://www.python.org/download |
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
| FROM tianon/centos:5.8 | |
| RUN yum install -y curl tar gcc make xz | |
| RUN mkdir /usr/src/python | |
| WORKDIR /usr/src/python | |
| RUN curl -Sl "https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz" > Python-2.7.8.tar.xz | |
| RUN xz -dc < Python-2.7.8.tar.xz > Python-2.7.8.tar | |
| RUN tar -xvf Python-2.7.8.tar -C /usr/src/python --strip-components=1 | |
| # You may want to verify the download with gpg: https://www.python.org/download |
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
| # Vagrant commands | |
| vagrant reload #! | |
| vagrant status | |
| vagrant suspend | |
| vagrant resume | |
| vagrant halt | |
| vagrant up | |
| vagrant package | |
| vagrant destroy | |
| vagrant box add <nombre> <url> |
OlderNewer