Skip to content

Instantly share code, notes, and snippets.

View cvakiitho's full-sized avatar
🌈
Focusing

Tomáš Hartmann cvakiitho

🌈
Focusing
View GitHub Profile
@cvakiitho
cvakiitho / docker-ce-rhel.sh
Last active November 2, 2017 10:22
get-docker without rhel check
#!/bin/sh
set -e
# This script is meant for quick & easy install via:
# $ curl -fsSL get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#
# For test builds (ie. release candidates):
# $ curl -fsSL test.docker.com -o test-docker.sh
# $ sh test-docker.sh
from selenium import webdriver
driver = webdriver.Remote(
command_executor='http://localhost:4444/wd/hub',
desired_capabilities=webdriver.DesiredCapabilities.FIREFOX
)
# driver = webdriver.Firefox()
driver.get("https://sapui5.hana.ondemand.com/#docs/guide/95d113be50ae40d5b0b562b84d715227.html")
@cvakiitho
cvakiitho / gist:7167ff3098d7f28e90c2e79d653eda6f
Last active July 26, 2016 14:09
Git extract directory 1 from repo A to repo B - including history only from that dir
git clone <git repository A url>
cd <git repository A directory>
git remote rm origin
git filter-branch --subdirectory-filter <directory 1> -- --all
// now you can move it to another dir if you need to - so it is in same structure as repo B
git clone <git repository B url>
cd <git repository B directory>
git remote add repo-A-branch <git repository A directory>
@cvakiitho
cvakiitho / Protractor.js
Last active September 10, 2015 12:42
useful snippets for protractor
//when you expect error on some command:
element.click().then(function(){
console.log('shouldn`t get here raise error:');
expect(1).toBe(0);
},function(err){
console.log('expected error, as element should not receive click');
});
//Expecting some URL change: