Skip to content

Instantly share code, notes, and snippets.

@koola
koola / uninstall_python.sh
Created November 21, 2022 14:43
Mac OS X uninstaller for default Python dmg
#!/bin/bash
(( ${#} >= 0 )) || {
echo 'DISCLAIMER: USE THIS SCRIPT AT YOUR OWN RISK!'
echo 'THE AUTHOR TAKES NO RESPONSIBILITY FOR THE RESULTS OF THIS SCRIPT.'
echo 'Press Control-C to quit now.'
read
echo 'Re-running the script with sudo.'
echo 'You may be prompted for a password.'
sudo ${0} sudo
@koola
koola / uninstall_node.sh
Created November 21, 2022 09:44
Mac OS X uninstall script for default node dmg
#!/bin/bash
(( ${#} >= 0 )) || {
echo 'DISCLAIMER: USE THIS SCRIPT AT YOUR OWN RISK!'
echo 'THE AUTHOR TAKES NO RESPONSIBILITY FOR THE RESULTS OF THIS SCRIPT.'
echo "Disclaimer aside, this worked for the author, for what that's worth."
echo 'Press Control-C to quit now.'
read
echo 'Re-running the script with sudo.'
echo 'You may be prompted for a password.'
class BrowserActions {
click(element, timeout=5000) {
return this.waitForElementToBeClickable(element, timeout).then(() => {
return element.click();
})
}
waitForElementToBeClickable(ele, timeout=5000) {
@koola
koola / build.bat
Created November 28, 2015 02:36
Development environment build tools setup
@echo off
powershell.exe -executionpolicy unrestricted -command "%~dp0\build.ps1"
@koola
koola / matchers.js
Created March 1, 2015 02:40
Jasmine toMatchJSONSchema custom matcher
'use strict';
var validate = require('jsonschema').validate;
var customMatchers = {
toMatchJSONSchema: function (expected) {
var notText = this.isNot ? " not" : "";
this.message = function() {
return "Schema is" + notText + " valid"
};
@koola
koola / matchers.js
Created March 1, 2015 02:23
Jasmine toDeepPartiallyEqual custom matcher
'use strict';
var customMatchers = {
toDeepPartiallyEqual: function (expected) {
var compare = function(obj1, obj2) {
for(var i in obj2) {
if(typeof obj2[i] !== typeof obj1[i]) {
return false
}
switch (typeof obj2[i]) {
@koola
koola / selenium_node_install.bat
Last active January 8, 2024 16:55
Install Selenium grid node as a windows service
@echo off
powershell.exe -executionpolicy unrestricted -command "%~dp0\selenium_node_install.ps1 -nodes ie -hub 192.168.1.1"
REM powershell.exe -executionpolicy unrestricted -command "%~dp0\selenium_node_install.ps1 -nodes ie,chrome -hub 192.168.1.1"
REM powershell.exe -executionpolicy unrestricted -command "%~dp0\selenium_node_install.ps1 -nodes ie,chrome,firefox -hub 192.168.1.1"
pause
@koola
koola / jenkins
Last active December 19, 2015 19:58
Setup Jenkins CI Server on Cent 6.3 minimal install
#!/bin/bash
# /etc/init.d/jenkins
# CentOS release 6.3 (Final)
#
### BEGIN INIT INFO
# Provides: jenkins
# Required-Start: $local_fs $remote_fs $syslog $network $time
# Required-Stop: $local_fs $remote_fs $syslog $network $time
# Default-Start: 3 5
# Default-Stop: 0 1 2 6