Skip to content

Instantly share code, notes, and snippets.

Dinis Cruz DinisCruz

Block or report user

Report or block DinisCruz

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
DinisCruz / gist:881344
Created Mar 22, 2011
O2 Platform script to create Summit Certificates (First pass, needs to be designed)
View gist:881344
var sourceFolder = @"C:\O2\_tempDir\Summit Certificates\".createDir(); // DC NOTE: use this folder
var pathToBackGroundImage = sourceFolder.pathCombine("Summit Logo.gif");
if (pathToBackGroundImage.fileExists().isFalse())
"http://www.owasp.org/images/b/b7/Final_summit_logo.jpg".download(pathToBackGroundImage);
Document doc = null;
PdfWriter writer = null;
@DinisCruz
DinisCruz / gist:2350359
Created Apr 10, 2012
Code to Create folders based on file extension (from OWASP Wiki)
View gist:2350359
var sourceFolder = @"C:\O2\_USERDATA\WikiBackup\O2MediaWikiAPI\(4_10_2012,2_04 AM)\Files";
var files = sourceFolder.files();
foreach(var file in files)
{
var targetFolder = sourceFolder.pathCombine(file.extension()).createDir();
Files.MoveFile(file,targetFolder);
}
@DinisCruz
DinisCruz / gist:2375660
Created Apr 13, 2012
Gaug.es customization to feed page events
View gist:2375660
var my_Gauge =
{
data_site_id : '....'
, title : null
, resource : null
, track : function(title, resource)
{
my_Gauge.title = title;
my_Gauge.resource = resource;
_gauges.track();
@DinisCruz
DinisCruz / gist:2397851
Created Apr 16, 2012
default gaug.es tracking code
View gist:2397851
<script type="text/javascript">
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '.............');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
@DinisCruz
DinisCruz / gist:2397865
Created Apr 16, 2012
Git Embedded script
View gist:2397865
<script src="https://gist.github.com/2397851.js?file=gistfile1.txt">
@DinisCruz
DinisCruz / authtest.py
Created Apr 23, 2012
TeamMentor python - Initial Python Web service call data (by arvinddoraiswamy)
View authtest.py
import suds
import re
url='http://.....:8000//aspx_pages/TM_WebServices.asmx?WSDL'
def main():
client=connect_and_login(url)
get_methods_parameters_datatypes(client)
def connect_and_login(url):
@DinisCruz
DinisCruz / authtest_apr20.py
Created Apr 23, 2012
TeamMentor python - Parameterless methods tested for 2 roles and sample output uploaded (by arvinddoraiswamy)
View authtest_apr20.py
import suds
import re
import sys
import os
import traceback
url='http://....:8000//aspx_pages/TM_WebServices.asmx?WSDL'
users={}
def main():
@DinisCruz
DinisCruz / authtest_apr23.py
Created Apr 23, 2012
TeamMentor python - Invoke WebServices and test Anonymous access (by arvinddoraiswamy
View authtest_apr23.py
import suds
import re
import sys
import os
#Enter WSDL Url here
url='http://....:8000//aspx_pages/TM_WebServices.asmx?WSDL'
#All Global variables
users={}; datatype_values={}; report={}
@DinisCruz
DinisCruz / gist:2638203
Created May 8, 2012
Creating an StandAlone Form window (WinForms)
View gist:2638203
//var topPanel = panel.clear().add_Panel();
var topPanel = "Stand alone Form".popupWindow(400,200);
var textBox = topPanel.add_TextBox(true);
textBox.set_Text("Let's make this a stand alone form :)");
@DinisCruz
DinisCruz / gist:2640284
Created May 8, 2012
Visualize TeamMentor Article's Links using GraphSharp
View gist:2640284
"graph".o2Cache(null);
var graph = "graph".o2Cache<GraphSharp.Controls.GraphLayout>(
()=> {
var topPanel = panel.clear().add_Panel();
var _graph = topPanel.add_Graph();
var graphOptions = topPanel.add_GraphOptions(_graph);
graphOptions.str().info();
return _graph;
});
You can’t perform that action at this time.