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
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
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 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 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
<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
#!/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
function checkFiles($filearr, $uploaddir, $requireimage=false, $filter=array()) | |
{ | |
$maxsize = ini_get("upload_max_filesize"); | |
$final = array('errors' => array(), | |
'files' => array(), | |
'result' => array() | |
); | |
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
<select onchange="location.href=this.value;"><optgroup label=" Test Test "><option value="javascript:;"></option><option value="http://localhost:8080/group/control_panel/manage?p_p_id=2&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10177&refererPlid=10180"> My Account </option><option value="http://localhost:8080/group/control_panel/manage?p_p_id=140&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10177&refererPlid=10180"> My Pages </option><optgroup label=" liferay.com Global Test Test's Personal Site liferay.com "><option value="javascript:;">liferay.com</option><option value="http://localhost:8080/group/control_panel/manage?p_p_id=2&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&refererPlid=10180&doAsGroupId=10189"> Global </option><option value="http://localhost:8080/group/control_panel/manage?p_p_id=2&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&refererPlid=10180&doAsGroupId=10195"> Test Test's Personal Site </option><option value="http://localhost:8080/group/control |