Skip to content

Instantly share code, notes, and snippets.

View bogdan-nourescu's full-sized avatar

Bogdan Nourescu bogdan-nourescu

View GitHub Profile
public static String exec(String command) {
try {
Process p1 = Runtime.getRuntime().exec(command);
p1.waitFor();
BufferedReader reader =
new BufferedReader(new InputStreamReader(p1.getInputStream()));
StringBuilder sb = new StringBuilder();
StringBuilder sb2 = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
public static void writeFile(GcsFilename gcsFileName, String content, String contentType) {
try {
GcsFileOptions options = new GcsFileOptions.Builder().mimeType(contentType).contentEncoding("UTF-8").build();
GcsService gcsService = GcsServiceFactory.createGcsService();
GcsOutputChannel writeChannel;
writeChannel = gcsService.createOrReplace(gcsFileName, options);
writeChannel.write(ByteBuffer.wrap(content.getBytes("UTF-8")));
writeChannel.close();
} catch (IOException e) {
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="Anunt" attributes="atasamente">
<template>
<core-ajax id="atasamente" auto url="http://gdata.youtube.com/feeds/api/videos/" params='{"alt":"json", "q":"chrome"}' handleas="json" on-core-response="{{ onLoadAtasamente }}"></core-ajax>
<style>
:host {
position: absolute;
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="adma-tip-cont" attributes="name institution type">
<template>
<style>
:host {
position: absolute;
width: 100%;
public static String exec(String command) {
try {
Process p1 = Runtime.getRuntime().exec(command);
p1.waitFor();
BufferedReader reader =
new BufferedReader(new InputStreamReader(p1.getInputStream()));
StringBuilder sb = new StringBuilder();
StringBuilder sb2 = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
iso-codes libaudio2 libgstreamer-plugins-base0.10-0 libgstreamer0.10-0
libmng1 libqt4-network libqt4-xml libqtcore4 libqtdbus4 libqtgui4
libqtwebkit4
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libasyncns0 libav-tools libavcodec53 libavdevice53 libavfilter2
https://www.googleapis.com/auth/admin.directory.device.chromeos, https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly, https://www.googleapis.com/auth/admin.directory.device.mobile, https://www.googleapis.com/auth/admin.directory.device.mobile.action, https://www.googleapis.com/auth/admin.directory.device.mobile.readonly, https://www.googleapis.com/auth/admin.directory.group, https://www.googleapis.com/auth/admin.directory.group.member, https://www.googleapis.com/auth/admin.directory.group.member.readonly, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.notifications, https://www.googleapis.com/auth/admin.directory.orgunit, https://www.googleapis.com/auth/admin.directory.orgunit.readonly, https://www.googleapis.com/auth/admin.directory.user, https://www.googleapis.com/auth/admin.directory.user.alias, https://www.googleapis.com/auth/admin.directory.user.alias.readonly, https://www.googleapis.com/auth/admin.directory.user.readon
<pdf-footer>
<html><head><script type="text/javascript" noparse="false">
<![CDATA[
function subst() {
var vars = {};
var x = document.location.search.substring(1).split('&');
for (var i in x) {
var z = x[i].split('=', 2);
vars[z[0]] = unescape(z[1]);
https://kinetic-primer-853.appspot.com/_ah/conflogin?state=AJKiYcGjO-4GgdikjIPsaWlNHLyQJfbB9pKViibj6Ey5LwImuNHd8lcyfKxD4t1t62n3J_d30rO4xylByVxghILm3OWsJF_FIBRFW5UNJBOlPH73dsXnMrFfjOvodwnUl34KcKn0CprPQP3hMoG7DF9_bcr4mGTBXc-6FdNlkdaZJ5k9GghIHkYmciumLjbzinzzVX0E6kr1Srk1CvaHArVBjUUWTj5zY0l7VIVs2idJAeBoUuP9ISN26hNGENm0D9ULC_46a2oBNLOqqpBJ5CW9PTTgaQmGsZp41fA9twdfK4zzm-5iuA5EpsdI3IBvWeTVL6IoIOXaIYR1zVydJ9uBhJvfa-ow-4TJkuyUbq9m3uy467PYhDHsfGSr92G1GQPspjDGIGE7Ywe0cY8KEhd2-kIOrq1WyFVC5FxqaUwDN28D4RYUkCanof0mKdxf-FzOneoTaEmForvse2-5YymV9R2TxZbrc8DgHjezFySyY2AX0BTx35cKsR1i85uJ2j48InmYNJzTF1l4LmjlhYTAsm_PvSjDH6TBIClC41ZqAW8tbUOLQBlGGDdcBY2N9NUxzw48axTS-2Yyn77ahGT9B7kk6XyhcoXqJ4Uwy3lu2I0TosFPH_GzpJNaiPl8R_2R80LhyD6FigfSoySDVLg3gmY95iy9U7RBSNLgZXQwBlFzBqDfs99xOpOL1dBu9Tnd8YQ-orXmJzfw7JBO2ABZiYcQAzKcTU7nFHeJbLZd0cKKtS8I5osXonEbGSX2l2Fhxvi1GkmLq4kDA9IejqUaB1bFOLmhgTxbFZSjgVmIzzlWde1c-pGaVaQvzh7Z_qHLjgOFFUz8WSQreglBB1OEn7fMXj8FxOWxDlCxsmixYVxxOIl-QZsXO__7gnMmBSiSkSj0P4tmdeDx3x5u6emUtIE5GI6-joQOwsyLQTH7xEgSEQXj6TJuKx6E4o7wGtneB