Skip to content

Instantly share code, notes, and snippets.

View nttuyen's full-sized avatar

Nguyen The Tuyen nttuyen

View GitHub Profile
@nttuyen
nttuyen / 1_column_chart
Last active August 29, 2015 14:05
Google chart
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});
@nttuyen
nttuyen / env.sh
Last active August 29, 2015 13:56
evn.sh
#!/bin/bash
ENV_DIR=~/.environments
ENV_HOME=$ENV_DIR
#Process JAVA with JDK
DEFAULT_JDK_VERSION=7
DEFAULT_JDK_HOME=$ENV_DIR/jdk
function setup_jdk() {
#Process old version of jdk
@nttuyen
nttuyen / TestUpdateLayout
Created October 8, 2013 07:18
TestUpdatelayout
public void testUpdateLayout() {
PageData page = createPage(createSite(SiteType.PORTAL, "test_layout_page"), "page", new PageState.Builder().build());
createElements(page, FOO_PORTLET, BAR_PORTLET);
String layoutId = page.layoutId;
NodeContext<Element, ElementState> pageContext = layoutService.loadLayout(Element.MODEL, layoutId, null);
assertEquals(2, pageContext.getNodeSize());
Element foo = pageContext.getNode(0);
Element bar = pageContext.getNode(1);
testInfo(foo, bar);