This file contains 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
$regHive = [Microsoft.Win32.RegistryHive]::LocalMachine | |
$regView = [Microsoft.Win32.RegistryView]::Registry32 | |
$regKey = [Microsoft.Win32.RegistryKey]::OpenBaseKey($regHive, $regView) | |
$frameworkPath = $regKey.OpenSubKey("SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").GetValue("InstallPath") | |
$frameworkPath | |
#returns D:\Windows\Microsoft.NET\Framework\v4.0.30319\ |
This file contains 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
// a) Public IP address | |
WebClient webClient = new WebClient(); | |
var IP = webClient.DownloadString("http://checkip.dyndns.org/"); | |
return IP; // Current IP Address: 104.45.82.120 | |
//using System.Net; | |
//b) current hostname | |
return Dns.GetHostName(); // RD000D3AB0B28A |
This file contains 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 bsl = (ITradeServices)App.BSL; | |
return bsl.login("uid:1","xxx"); | |
//using Trade.BusinessServiceContract | |
//using Trade.StockTraderWebApplicationServiceClient | |
//using StockTrader; | |
//O2Ref:StockTrader.exe | |
//O2Ref:PresentationFramework.dll | |
//O2Ref:PresentationCore.dll |
This file contains 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
#!/bin/sh | |
if [ ! -f ./TM_4_0_QA ]; then | |
echo Folder TM_4_0_QA exists so doing a git pull | |
cd TM_4_0_QA | |
git pull origin | |
git submodule update | |
#ls -l | |
else | |
echo Folder TM_4_0_QA does not exists so doing a git pull | |
git@github.com:TeamMentor/TM_4_0_QA.git |
This file contains 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
describe 'test suite xyz', -> | |
skip_Tests_If_Offline = (testSuite,next)=> | |
url = "https://www.google.com" | |
url.GET (html)=> | |
if not html | |
for test in testSuite.tests | |
test.pending = true | |
next() | |
This file contains 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
QA_NWR_API = require './TM-QA-NWR-API' | |
app = require '../../app' | |
describe.only 'swagger', -> | |
page = QA_NWR_API.create(before, after) | |
url = 'http://localhost:8002/' | |
server = null | |
before (done)-> |
This file contains 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
console.log('--------------------------') | |
Object.defineProperty global, '__stack', { | |
get: ()-> | |
orig = Error.prepareStackTrace; | |
Error.prepareStackTrace = (_, stack)-> return stack; | |
err = new Error; | |
Error.captureStackTrace(err, arguments.callee); | |
stack = err.stack; | |
Error.prepareStackTrace = orig; |
This file contains 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
## using watcher | |
require 'fluentnode' | |
fs = require 'fs' | |
project_Folder = atom.project.path | |
coverage_file = project_Folder.path_Combine('coverage/lcov.info') | |
watcher_Src =null | |
watcher_Test =null | |
watcher_Cov =null |
This file contains 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
require('nw.gui').Window.open('http://www.google.com', { 'new-instance': true , show:true, toolbar:true}) |
This file contains 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
if (iframe1.contentWindow.location.href.indexOf 'google') is -1 | |
iframe1.src='https://www.google.com' | |
else | |
document = iframe1.contentDocument | |
document.getElementsByName('q')[0].value = 'Node WebKit REPL' | |
document.getElementsByName('btnG')[0].click() |