Skip to content

Instantly share code, notes, and snippets.

View dmitryck's full-sized avatar

dmitryck dmitryck

  • krasava
View GitHub Profile
@UKNC
UKNC / Install headless Firefox on CentOS 6 for Selenium automation.md
Last active May 5, 2023 15:06
Install headless Firefox on CentOS 6 for Selenium automation

Abstract

In the manual the steps required to install headless Firefox on CentOS 6 are described. Headless Firefox may be needed to perform GUI automated testing.

All steps of this manual have been validated on CentOS 6.8. It should not be a problem to adapt the solution to other distros.

Steps

Upgrade yum

@itsamoreh
itsamoreh / caps-as-escape
Last active October 29, 2019 15:20
Dconf remap caps as escape - Tested on Ubuntu 16.10
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:escape']"
require 'cucumber'
require 'selenium-webdriver'
# require 'cukehub' # optional, but recommended. See cukehub.com for more details
caps = Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: { binary: "/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary",
args: [ "--headless" ]})
Before do
@browser = Selenium::WebDriver.for :chrome, desired_capabilities: caps
end
@dnovik
dnovik / cities.csv
Created January 19, 2019 06:55 — forked from nalgeon/cities.md
Города России с координатами
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 21 columns, instead of 18. in line 5.
Индекс,Тип региона,Регион,Тип района,Район,Тип города,Город,Тип н/п,Н/п,Код КЛАДР,Код ФИАС,Уровень по ФИАС,Признак центра района или региона,Код ОКАТО,Код ОКТМО,Код ИФНС,Часовой пояс,Широта,Долгота,Федеральный округ,Население
385200,Респ,Адыгея,,,г,Адыгейск,,,0100000200000,ccdfd496-8108-4655-aadd-bd228747306d,4: город,0,79403000000,79703000001,0107,UTC+3,44.8783715,39.190172,Южный,12689
385000,Респ,Адыгея,,,г,Майкоп,,,0100000100000,8cfbe842-e803-49ca-9347-1ef90481dd98,4: город,2,79401000000,79701000001,0105,UTC+3,44.6098268,40.1006527,Южный,144055
649000,Респ,Алтай,,,г,Горно-Алтайск,,,0400000100000,0839d751-b940-4d3d-afb6-5df03fdd7791,4: город,2,84401000000,84701000,0400,UTC+7,51.9582681,85.9602957,Сибирский,62861
658125,край,Алтайский,,,г,Алейск,,,2200000200000,ae716080-f27b-40b6-a555-cf8b518e849e,4: город,0,01403000000,01703000,2201,UTC+7,52.4920914,82.7794145,Сибирский,28528
656000,край,Алтайский,,,г,Барнаул,,,2200000100000,d13945a8-7017-46ab-b1e6-ede1e89317ad,4: город,2,01401000000,01701000,2200,UTC+7,53.
@mrk21
mrk21 / tailcall_optimization.rb
Created May 21, 2020 06:28
Tail call optimization for Ruby
# @see [Rubyの末尾呼び出し最適化を試す - Qiita](https://qiita.com/rsnni/items/8f818f2c2da07896fc7e)
RubyVM::InstructionSequence.compile_option = {
:tailcall_optimization => true,
:trace_instruction => false
}
RubyVM::InstructionSequence.new(<<-EOS).eval
def fact(x)
return 1 if x == 0