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/env python | |
| """ | |
| Git command to automate many common tasks involving pull requests. | |
| Usage: | |
| gitpr [<options>] <command> [<args>] | |
| Options: |
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
| <aui:script use="aui-io-request"> | |
| var timer; | |
| var request = A.io.request( | |
| '/url' | |
| { | |
| dataType: 'json', | |
| on: { | |
| success: function(event) { | |
| var response = this.get('responseData'); | |
| var responseStatus = response.status; |
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 A = AUI(); | |
| var Lang = A.Lang; | |
| var now = Lang.now; | |
| var number_of_levels = 10; | |
| var ts = now(); | |
| create_children = function(amount, level) { | |
| amount = amount || 10; | |
| if (level <= 3) { |
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 ifr = document.createElement('iframe'); | |
| ifr.src = 'javascript:;'; | |
| ifr.style.display = 'none'; | |
| document.body.appendChild(ifr); | |
| var js = []; | |
| for (var i = 0; i < 11; i++) { | |
| js.push('<script ' + (i !== 0 ? 'language="Javascript1.' + i + '"' : 'type="text/language"') + '">window.jsversion = 1.'+ i +';</script>'); | |
| } | |
| ifr.contentWindow.document.write(js.join('')); | |
| console.log(ifr.contentWindow.jsversion); |
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 pt = A.one('#manageContentDialog').get('contentWindow.performance.timing'); | |
| var inSec = function(v){return v /= 1000;}; | |
| console.log('Network latency: %d, Entire load: %d, page load time: %d', inSec(pt.responseEnd - pt.fetchStart), inSec(pt.loadEventEnd-pt.navigationStart), inSec(pt.loadEventEnd-pt.responseEnd)); |
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 first1 = function(c){ | |
| this.__NAME = this.constructor.NAME; | |
| console.log('first1 constructor', this.__NAME); | |
| first1.superclass.constructor.apply(this, arguments); | |
| }; | |
| first1.NAME = 'first1'; | |
| A.extend(first1, A.Widget, { | |
| initializer: function(){ |
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
| /*pc = A.Widget.getByNode($0); | |
| g = pc.get("graph").get("graphic"); | |
| var w = g.get('width'), h = g.get('width'); | |
| var nw = w - 100, nh = h - 100; | |
| var c = g.addShape({type: 'circle', | |
| width: nw, | |
| height: nh, | |
| x: 100, | |
| y: 100, | |
| fill: {color: '#ffffff'}, |
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
| addInputFocus: function() { | |
| var handleFocus = function(event) { | |
| var target = event.target; | |
| var tagName = target.tagName; | |
| if (tagName) { | |
| tagName = tagName.toLowerCase(); | |
| } |
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 createPage = function(index) { | |
| Liferay.Service( | |
| '/layout/add-layout', | |
| { | |
| groupId: 22101, | |
| privateLayout: false, | |
| parentLayoutId: 0, | |
| name: 'Test' + index, | |
| title: 'Test' + index, | |
| description: '', |