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
| (__(__)==D ~ ~(___☼___) |
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
| h1. Git for deployment | |
| Pros: | |
| * instant (atomic?) switching | |
| * diffs between versions are concise and can include commits | |
| * VERY little space | |
| * pre and post-update hooks allow you to reject pushes that may overwrite un-commited data | |
| Cons: |
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
| { | |
| "Christopher Troup": [ | |
| { | |
| item: "Coffee", | |
| modifiers: [ | |
| cream: 2, | |
| sugar: 2 | |
| ], | |
| amount: 1 | |
| }, |
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 M(object): | |
| def __init__(self, *args, **kwargs): | |
| super(M, self).__init__() | |
| setattr(self, "foo", self.baz) | |
| setattr(self, "other_long_name", self.baz) | |
| setattr(self, "metatastic", True) | |
| @classmethod | |
| def baz(cls): | |
| return "FooBaz -- Base class %s" % cls |
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
| #!/bin/sh | |
| set -x | |
| nginx_version=1.0.10 | |
| sudo apt-get install gcc | |
| sudo apt-get install libpcre3-dev | |
| sudo apt-get install libssl-dev | |
| mkdir install_nginx && cd install_nginx |
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
| data = ServerResponses.initialData | |
| data = merge data, | |
| player: | |
| points: 10 | |
| awarded_prize: | |
| prize: | |
| name: "Better prize" | |
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
| data = ServerResponses.initialData | |
| # data.player.points = 10 | |
| # oh noes, we have ServerResponses.initialData infected | |
| data = _.clone data | |
| data.player = _.clone data.player | |
| data.player.points = 10 | |
| server_mock.respondTo "GET /something", data |
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
| qs = (arr) -> | |
| [].concat qs(i for i in arr when i < arr[0]), [arr[0]], qs(i for i in arr when i > arr[0]) if arr.length <= 1 else arr |
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
| var ViewFactory = (function() { | |
| function ViewFactory(pubSub) { | |
| this.pubSub = pubSub; | |
| this.registry = {}; | |
| this.registry['factory'] = this; | |
| } | |
| ViewFactory.prototype.register = function(key, value) { | |
| return this.registry[key] = value; |