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
#Export data to csv | |
\copy usertable to 'filename.csv' csv header |
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
# This gist shows how to perform Browser testing using Selenium Webdrier & Python | |
#Ensure that you have downloaded ChromeDriver.exe and placed it in some directory,say C:/binaries | |
#Also make sure C:/binaries is set in your windows %PATH%. For testing, you can use the below set command : | |
#set PATH=C:/binaries;%PATH% | |
from selenium import webdriver | |
browser = webdriver.Chrome() | |
#If a blank Chrome window opens up, you are good to proceed with next steps | |
browser.get('http://website:8000/Login') | |
username = browser.find_element_by_id("loginname") | |
password = browser.find_element_by_id("passwd") |
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 sample config file for exporting data from Oracle to ElasticSearch | |
#Note the capital J in "Java" for jdbc_driver_class | |
input { | |
jdbc { | |
jdbc_connection_string => "jdbc:oracle:thin:@oraclehost:1522/ORASID" | |
jdbc_user => "oracle_user" | |
jdbc_password => "oracle_password" | |
jdbc_driver_library => "/home/tsundara/elk/logstash-2.3.4/lib/jdbc_libs/ojdbc6.jar" | |
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver" |
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
--Straighforward table_name and corresponding column names | |
SELECT table_name, LISTAGG(column_name, ',') WITHIN GROUP (ORDER BY column_name) as COLUMNS | |
FROM user_tab_cols | |
group by table_name |
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
#Create a new mysql server instance (a docker container). | |
#On Mac OS | |
#Data will be stored in the directory /Users/johndoe/Dockerdata/mysqldata | |
docker run --name newmysql -v /Users/johndoe/Dockerdata/mysqldata:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mysqlpassword -d mysql | |
#Get IP address of Docker Container 39baf42be8d4 | |
docker inspect --format '{{ .NetworkSettings.IPAddress }}' 39baf42be8d4 |
NewerOlder