Skip to content

Instantly share code, notes, and snippets.

View p0deje's full-sized avatar

Alex Rodionov p0deje

View GitHub Profile
@p0deje
p0deje / drag_and_drop.rb
Created June 29, 2022 14:42
Workaround drag and drop issues in Chrome
# Take from https://github.com/bormando/selenium-tools
SNIPPET = <<~JS
function simulateDragDrop(sourceNode, destinationNode) {
var EVENT_TYPES = {
DRAG_END: 'dragend',
DRAG_START: 'dragstart',
DROP: 'drop'
}
function createCustomEvent(type) {
@p0deje
p0deje / README.md
Last active November 14, 2023 14:42
Reset titles migration for Maccy 0.21
  1. Run the following in Terminal.app:
defaults write org.p0deje.Maccy migrations -dict "2020-02-22-history-item-add-copied-at" 1 \
                                                 "2020-02-22-history-item-add-number-of-copies" 1 \
                                                 "2020-04-18-switch-storage-to-core-data" 1 \
                                                 "2020-04-25-allow-custom-ignored-types" 1 \
                                                 "2020-06-19-use-keyboardshortcuts" 1 \
                                                 "2020-09-01-ignore-keeweb" 1 \
 "2021-02-20-allow-to-customize-supported-types" 1 \
$ java -version
openjdk version “11.0.7” 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10)
OpenJDK 64-Bit Server VM (build 11.0.7+10, mixed mode)
$ bazel build grid
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:grid (313 packages loaded, 4129 targets configured).
INFO: Found 1 target...
ERROR: /Users/p0deje/Development/SeleniumHQ/selenium/java/server/src/org/openqa/selenium/grid/config/BUILD.bazel:3:13: Building java/server/src/org/openqa/selenium/grid/config/libconfig.jar (17 source files) and running annotation processors (AutoServiceProcessor) failed (Exit 1): java failed: error executing command
import AppKit
import Carbon
// Custom NSMenu implementation allowing to filter key inputs.
class Menu: NSMenu {
required init(coder decoder: NSCoder) {
super.init(coder: decoder)
}
init() {
@p0deje
p0deje / java-version.log
Last active October 1, 2017 08:59
Building JRuby on JDK 9
$ java -version
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
@p0deje
p0deje / Vagrantfile
Last active March 29, 2017 13:42
Buck issue when building on network directory
Vagrant.configure(2) do |config|
config.vm.box = 'mwrock/Windows2012R2'
config.vm.box_version = '0.6.1'
config.vm.provision :shell, path: 'prepare.cmd'
config.vm.provision :shell, path: 'install.cmd'
config.vm.provider :virtualbox do |vbox|
vbox.gui = true
end
@p0deje
p0deje / ie.log
Last active March 27, 2017 05:50
IEDriverServer Beta Testing with WatirSpec
Finished in 20 minutes 0 seconds (files took 5.53 seconds to load)
1306 examples, 8 failures
Failed examples:
rspec ./spec/watirspec/after_hooks_spec.rb:130 # Browser::AfterHooks #run raises UnhandledAlertError error when running error checks with alert present
rspec ./spec/watirspec/alert_spec.rb:27 # Alert API alert #exists? returns true if alert is present
rspec ./spec/watirspec/browser_spec.rb:80 # Browser #name returns browser name
rspec ./spec/watirspec/cookies_spec.rb:62 # Browser#cookies adds a cookie with options
rspec ./spec/watirspec/elements/button_spec.rb:136 # Button #style returns the style attribute if the button exists
@p0deje
p0deje / dein.log
Created February 1, 2017 05:32
Comparison of MacVim startup using different plugin managers
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.013 000.013: --- VIM STARTING ---
000.129 000.116: Allocated generic buffers
000.460 000.331: locale set
000.490 000.030: GUI prepared
000.493 000.003: clipboard setup
000.503 000.010: window checked
@p0deje
p0deje / selenium-bundled-jruby.md
Last active October 1, 2017 08:45
Creating the bundled JRuby for Selenium

Creating the bundled JRuby jar

  • Download latest JRuby complete release.
  • Rename downloaded JRuby complete jar to jruby-complete.jar.
  • For each gems you need to install, execute the following:
$ java -jar jruby-complete.jar -S gem install -i ./{{gem-name}} {{gem-name}} # add -v {{version}} if necessary
$ jar uf jruby-complete.jar -C {{gem-name}} .
$ rm -rf {{gem-name}}
@p0deje
p0deje / jenkins_restart_dead_executors.groovy
Last active August 10, 2018 07:30
Restart all dead executros on Jenkins (use from Script Console)
def deadExecutors = Jenkins.instance.computers.collect { c ->
c.executors.findAll { !it.isActive() }
}.flatten()
deadExecutors.each { it.doYank() }