This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //var topPanel = "{name}".popupWindow(700,400); | |
| var topPanel = panel.clear().add_Panel(); | |
| var textBox = topPanel.add_TextBox(true); | |
| textBox.set_Text("hello world"); | |
| textBox.script_Me(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var browser = "browser".o2Cache(()=>open.browser()); | |
| browser.parentForm().alwaysOnTop(); | |
| var articles = teamMentor.articles(); | |
| var count = 1; | |
| foreach(var article in articles) | |
| { | |
| "[{0}/{1}] saving: [{2}] {3}".info(count++ ,articles.size(), article.Library, article.Title); | |
| var url = "http://localhost:3187/editor/{0}".format(article.Id); | |
| browser .open(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //get a reference to the VisualStudio API | |
| var visualStudio = new VisualStudio_2010(); | |
| //write an Error and Warning messages to the 'Error List' VisualStudio Window | |
| visualStudio.errorList().add_Error("I'm an Error"); | |
| visualStudio.errorList().add_Warning("I'm an Warning"); | |
| //open a text file | |
| visualStudio.open_Document("a text file".saveWithExtension(".exe")); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var treeView = "C# files in a a path".popupWindow() | |
| .add_TreeView(); | |
| var codeViewer = treeView.insert_Right("Source Code") | |
| .add_TextArea(); | |
| treeView.afterSelect<string>((file) => codeViewer.set_Text(file)) | |
| .onDrop((path)=>{ | |
| treeView.clear(); | |
| foreach(var file in path.files("*.cs",true)) | |
| treeView.add_Node(file.fileName(),file); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var visualStudio = new VisualStudio_2010(); | |
| //add a button called "My Custom Code" to the "Tools" Menu (at bottom), which when clicked will | |
| //invoke the myCustomCode function which will show a WinForms MessageBox | |
| Action myCustomCode = ()=>{ | |
| "This is custom code executing".messageBox(); | |
| }; | |
| var toolsMenu = visualStudio.dte().get_Menu("Tools"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git init | |
| git remote add tm_master https://github.com/TeamMentor/Master | |
| git remote add tm_library https://github.com/TeamMentor-OWASP/Library_OWASP | |
| git remote add origin [email protected]:TeamMentor-OWASP/Master.git | |
| git pull origin master | |
| git branch -m master TeamMentor_3_1 | |
| git checkout --orphan master | |
| git rm -rf . | |
| git pull tm_master master:master | |
| git fetch tm_library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //**************** StandAlone exe package and setup **************** | |
| //O2Embed:LessMsi\lessmsi.exe | |
| //O2Package:E:\O2_V4\_TempDir_v4.3.2.0\_ToolsOrApis\LessMsi\wix.dll | |
| //O2Package:E:\O2_V4\_TempDir_v4.3.2.0\_ToolsOrApis\LessMsi\wixcab.dll | |
| //O2Package:MSI_Icon.ico | |
| O2ConfigSettings.O2Version = "LessMSI"; | |
| O2Setup.extractEmbededConfigZips(); | |
| if ("wixcab.dll".local().fileExists()) | |
| { | |
| "wixcab.dll".local().file_Copy(PublicDI.config.EmbeddedAssemblies.createDir()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tmSite = "http://localhost.:3187/"; | |
| var adminPwd = "{admin_pwd}"; | |
| var checkMark_XmlDumps = @"{path_to_folder_with}\_CheckMark_XmlDumps"; | |
| var teamMentor = "__teammentor".o2Cache<API_TeamMentor_WebServices>( | |
| ()=>{ | |
| var tm = new API_TeamMentor_WebServices(tmSite); | |
| tm.login("admin", adminPwd); | |
| return tm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tempDir = "".tempDir(); | |
| var fileName = "__" + '\x43' + "__.txt"; // this will work | |
| //var fileName = "__" + '\x43' + '\x00' + "__.txt"; // this will NOT work | |
| var filePath = tempDir.pathCombine(fileName); | |
| return "some text".saveAs(filePath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //var topPanel = panel.add_Panel(true); | |
| var topPanel = "PoC - View FluentSharp_BCL Embeded Icons".popupWindow(1000,700).add_Panel(true); | |
| var toolStrip = topPanel.add_ToolStrip().layout_Flow(); | |
| var iconsMappings = typeof(FormImages).ctor().propertyValues_MappedBy_Name<Bitmap>(); | |
| foreach(var iconMapping in iconsMappings) | |
| { | |
| var name = iconMapping.Key; | |
| var image= iconMapping.Value; |