Skip to content

Instantly share code, notes, and snippets.

DinisCruz-Dev

Block or report user

Report or block DinisCruz-Dev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DinisCruz-Dev
DinisCruz-Dev / 1a. simple Angular with route - Firebase_Login.html
Last active May 24, 2019
Creating an AngularJS page with Firebase login
View 1a. simple Angular with route - Firebase_Login.html
<!doctype html>
<html ng-app="project">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js" ></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular-route.js"></script>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" >
<script src="app.js"></script>
</head>
<body>
View 1. Eclipse - Groovy script to refresh browser on save.groovy
def editorTitle = "Firebase_Login.html"
import java.nio.file.*;
import com.sun.nio.file.*
def refreshBrowser = { path ->
eclipse.log("Opening browser with: " + path);
eclipse.views.create(path).clear().add.browser().open(path);
};
View 1. dynamically add a panel and a Browser.java
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.jface.action.Action;
import org.eclipse.ui.internal.about.*;
def panel = eclipseAPI.panels.add_Panel("asd_2 123");
for (def control : panel.composite.getChildren()) {
@DinisCruz-Dev
DinisCruz-Dev / 1.a. execute groovy from Groovy Script.java
Last active Dec 28, 2015
SWTBot scritps (inside TeamMentor Eclipse Plugin)
View 1.a. execute groovy from Groovy Script.java
//run these first (so that the code below compiles)
eclipseAPI.extraGroovyJars =
[ "/Users/plugin/_Dev/eclipses/Kepler/plugins/org.eclipse.swtbot.eclipse.finder_2.1.2.201311041021.jar" ,
"/Users/plugin/_Dev/eclipses/Kepler/plugins/org.eclipse.swtbot.swt.finder_2.1.2.201311041021.jar" ,
"/Users/plugin/_Dev/eclipses/Kepler/plugins/org.apache.log4j_1.2.15.v201012070815.jar" ]
def groovyExecution = view.groovyExecution;
def groovyShell = groovyExecution.groovyShell;
//def jar = "asd";
@DinisCruz-Dev
DinisCruz-Dev / 1. Get request with current data.groovy
Last active Oct 10, 2015
Misc Groovy Scripts that invoke the Firebase APIs
View 1. Get request with current data.groovy
def firebaseJsonData = "https://incandescent-fire-1320.firebaseio.com/.json?print=pretty"
def data = firebaseJsonData.toURL().getText()
return data;
@DinisCruz-Dev
DinisCruz-Dev / 1.finding findings view.groovy
Last active Aug 29, 2015
Groovy scripts on IBM AppScan Source Eclipse plugin
View 1.finding findings view.groovy
// A) get list of current installed plugins
return eclipse.registry.views_Ids().sort()
// B) get findings view
def findings = eclipse.views.open("com.ouncelabs.osa.ui.base.views.findings");
return findings;
// C) view findings object (properties, fields and methods)
def findings = eclipse.views.open("com.ouncelabs.osa.ui.base.views.findings");
show(findings) // return value: com.ouncelabs.osa.ui.extended.views.FindingsView@1d4e177
View 2. revert to self , invoke cmd.exe but fail to invoke ipconfig.exe.cs
"System.Web.dll".assembly().type("UnsafeNativeMethods").invokeStatic("RevertToSelf");
return "cmd.exe".startProcess_getConsoleOut("/c ipconfig");
return WindowsIdentity.GetCurrent().Name; // stays the same
@DinisCruz-Dev
DinisCruz-Dev / 1. final script.groovy
Last active Aug 29, 2015
Eclipse Groovy script to remove loading Icon from Default webbrowser
View 1. final script.groovy
def visible = false;
for(editor in eclipse.editors.list())
if (editor.id == "org.eclipse.ui.browser.editor")
editor.getEditor(true).webBrowser.busy.visible = visible;
@DinisCruz-Dev
DinisCruz-Dev / 1. index.html
Created Mar 1, 2014
Simple AngularJS app with Firebug lite
View 1. index.html
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="UTF-8">
<title>Angular example (with Firebug lite)</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script>
<script src="https://getfirebug.com/firebug-lite-debug.js" ></script>
<link href ="http://angularjs.org/css/bootstrap.min.css" rel="stylesheet" ></link>
</head>
<script type="text/javascript">
@DinisCruz-Dev
DinisCruz-Dev / 01. get file name from loaded editor.groovy
Last active Aug 29, 2015
Groovy scripts to parse Blogger export xml
View 01. get file name from loaded editor.groovy
def editor = eclipse.editors.get("blog-02-28-2014 (1).xml").getEditor(true);
def xmlFile = editor.getEditorInput().fileStore.toString();
return xmlFile;
You can’t perform that action at this time.