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
import json | |
import requests | |
import boto3 | |
import os | |
bucketname='webcrawlertempdata' | |
urltocheck='https://www.google.com' | |
s3bucketsrn='arn:aws:sns:eu-central-1:783377464316:WebsiteTracker' | |
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
1. use a profile for tests, eg: | |
ChromeOptions options = new ChromeOptions(); | |
options.addArguments("user-data-dir=C:/Users/user_name/AppData/Local/Google/Chrome/User Data"); | |
options.addArguments("--start-maximized"); | |
2. use multipass extension and add host credentials: | |
https://chrome.google.com/webstore/detail/multipass-for-http-basic/enhldmjbphoeibbpdhmjkchohnidgnah | |
3. test stuff :) | |
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
@Grab(group='org.apache.solr', module='solr-solrj', version='4.5.0') | |
import org.apache.solr.client.solrj.impl.HttpSolrServer | |
import org.apache.solr.common.SolrInputDocument | |
import org.apache.solr.common.SolrDocument; | |
import org.apache.solr.client.solrj.SolrQuery; | |
import org.apache.solr.client.solrj.response.QueryResponse; | |
import org.apache.solr.common.SolrDocumentList; | |
import org.apache.solr.client.solrj.util.ClientUtils; | |
import org.apache.solr.client.solrj.response.UpdateResponse; |
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
@Grab("com.gmongo:gmongo:1.0") | |
import com.gmongo.GMongo | |
def host = "host" | |
def port = "port" | |
def dbName = "dbname" | |
def gmongo = new GMongo("${host}:${port}") | |
def db = gmongo.getDB(dbName) |
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
1. download ojdbc7.jar (http://bugmenot.com/view/oracle.com) | |
2. script oracle.groovy: | |
def host = "host" | |
def port = "1521" | |
def db = "dbname" | |
def url = "jdbc:oracle:thin:@"+host+":"+port+":"+db | |
def username = "username" | |
def password = "password" | |
@GrabConfig(systemClassLoader=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
private void checkAllMethods(Class c){ | |
def testmethods = c.methods.findAll {it.getName().startsWith('$spock_feature')} | |
println "methods: " +testmethods*.getName() | |
testmethods.each { | |
Method m = it; | |
m.getAnnotations().each { | |
println it | |
} | |
} |