Skip to content

Instantly share code, notes, and snippets.

View ipeychev's full-sized avatar

Iliyan Peychev ipeychev

View GitHub Profile
@ipeychev
ipeychev / test_iframe.html
Created October 21, 2013 09:45
ACE Editor in an iframe
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
@ipeychev
ipeychev / iframe.html
Created October 21, 2013 09:46
ACE Editor in an iframe
<!DOCTYPE html>
<html lang="en">
<head>
<title>ACE in Action</title>
<style type="text/css" media="screen">
#editor {
position: absolute;
top: 0;
right: 0;
bottom: 0;
$FontAwesomePath: "aui/alloy-font-awesome/font" !default;
@import "aui/alloy-font-awesome/scss/variables";
@import "aui/alloy-font-awesome/scss/mixins-alloy";
@import "aui/alloy-font-awesome/scss/path-alloy";
@import "at-rules"
.aui {
@import "content_clean"
@import "aui_variables";
$iconSpritePath: '../images/aui/glyphicons-halflings.png' !default;
$iconWhiteSpritePath: '../images/aui/glyphicons-halflings-white.png' !default;
@import "aui/bootstrap";
@import "aui_custom";
@import "aui/responsive";
@import "liferay_custom";
some clean css code with at rules here
$FontAwesomePath: "aui/alloy-font-awesome/font" !default;
@import "aui/alloy-font-awesome/scss/variables";
@import "aui/alloy-font-awesome/scss/mixins-alloy";
@import "aui/alloy-font-awesome/scss/path-alloy";
/** EVERYTHING BELOW WILL BE WRAPPED IN .AUI {} EXCEPT AT-RULES */
@import "aui_variables";
@ipeychev
ipeychev / autocomplete-input.jsp
Last active January 12, 2023 16:41
Example usage of AutoCompleteInput in Liferaty Portal 7 (aka master right now)
/*
* For the UI, it is using the awesome AutoComplete from http://yuilibrary.com/yui/docs/autocomplete/
* All the documentation you can find there, for example to retrive the data via AJAX, DataSource, etc. is valid here too.
* Also, options, specific to AutoComplete from YUI you can pass via 'acConfig.the-attribute-here'. Look at 'acConfig.resultFormatter' below.
*/
<aui:input name="test123" type="textarea" with="300" height="400" value=""/>
<aui:script use="liferay-autocomplete-input">
var lacInput = new Liferay.AutoCompleteInput(
begin_compilation
name "$.testTag"
method "$.testTag:0"
date 1432461307000
end_compilation
begin_cfg
name "Z_Code generation"
begin_block
name "B0"
from_bci -1
begin_compilation
name "y"
method "y:0"
date 1432500821000
end_compilation
begin_cfg
name "Z_Code generation"
begin_block
name "B0"
from_bci -1
--- FUNCTION SOURCE (y) id{0,0} ---
() { return this._y; }
--- END ---
--- FUNCTION SOURCE (len) id{1,0} ---
(v) {
// We are going to deoptimize here when we call
// loop the second time because hidden class of
// v2 does not match hidden class of v.
// We changed by adding a new property "name" to
// the object allocated with Vec2.