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
| Ups.planController = SC.TreeController.create( | |
| SC.CollectionViewDelegate, | |
| /** @scope Ups.planController.prototype */ { | |
| content: null, | |
| treeItemChildrenKey: 'actions', | |
| treeItemIsGrouped: YES, | |
| collectionViewShouldBeginDrag: function(view) { | |
| alert("HELLO!"); | |
| return NO; | |
| }, |
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
| Ups.mainPage = SC.Page.design({ | |
| // The main pane is made visible on screen as soon as your app is loaded. | |
| // Add childViews to this pane for views to display immediately on page | |
| // load. | |
| mainPane: SC.MainPane.design({ | |
| childViews: 'middleView topView bottomView'.w(), | |
| topView: SC.ToolbarView.design({ | |
| layout: { top: 0, left: 0, right: 0, height: 36 }, | |
| childViews: 'labelView addButton'.w(), |
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
| Ups.GridLayout = SC.View.extend({ | |
| init: function() { | |
| sc_super(); | |
| var childViews = this.get('childViews'), idx, height, width, x, y, top, left, view, heightpct, widthpct; | |
| // calculate height / width percentages | |
| height = this.get('gridlayout').height; | |
| heightpct = 1 / height; | |
| width = this.get('gridlayout').width; | |
| widthpct = 1 / width; |
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 .settings import * | |
| LOGGING['formatters']['logsna'] = {'()': 'logsna.Formatter'} | |
| db_handler = {'level': 'INFO', | |
| 'class': 'logging.handlers.RotatingFileHandler', | |
| 'filename': here('logs', 'db.log'), | |
| 'maxBytes': 4194304, | |
| 'formatter': 'logsna', |
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
| def lowerdictkeys(d): | |
| new = {} | |
| for k, v in d.iteritems(): | |
| if type(v) == type({}): | |
| v = lowerdictkeys(v) | |
| k = k.lower() | |
| new[k] = v | |
| return new | |
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
| while aws cloudformation describe-stacks | grep CREATE_IN_PROGRESS >/dev/null; | |
| do | |
| sleep 1; | |
| done | |
| terminal-notifier -message "Environment Ready" |
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
| Host ec2*.compute.amazonaws.com | |
| User ubuntu |
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
| def shell_lines(s): | |
| return " ".join([ l.strip() for l in s.splitlines() ]) | |
| def local_env(**additional): | |
| return dict(*env.values(), *additional.values()) |
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
| def choose_from(choices, prompt="Which do you choose?"): | |
| while True: | |
| for index, choice in enumerate(choices): | |
| print "%2d. %s" % (index, choice) | |
| choice = raw_input("\n%s " % prompt) | |
| try: | |
| choice = int(choice) | |
| if choice < 0: | |
| raise ValueError | |
| return choices[choice] |
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
| grep -v "==" requirements.txt | grep -v "^#" | awk 'NF > 0' | sort |
OlderNewer