Skip to content

Instantly share code, notes, and snippets.

Daniel Schimikowski DerSchimi

Block or report user

Report or block DerSchimi

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
View gist:bf6ce23cb3372c3a21c85aa77a507bf2
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 :)
View gist:ef85117b33ecc30c8494ca1b6f4fa852
@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;
View gist:b94d30d563b6cb67de3adb2eb18b43ae
@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)
View gist:a0a420c27d034e43cf52b21d1843f242
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)
@DerSchimi
DerSchimi / gist:681349209dafadd37a73
Created Nov 19, 2014
Groovy reading spock feature methods
View gist:681349209dafadd37a73
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
}
}
You can’t perform that action at this time.