...Webpack can interpret the folder as an npm package. // vendor/asset-libs/bought-font/package.json { "name": "bought-font", "version": "1.0.0", "description": "", "main": "index.scss", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Salesman of...

makandra dev

...can reduce the webdriver update interval and see if VCR complains: WD_CACHE_TIME=1 bundle exec cucumber Note: Newer Rails versions come with the webdrivers gem automatically...

...are bundler aware. Some tests showed that parallel test execution (2 CPUs instead of 1) gives you a performance gain of about 25 - 30 %. Each doubling of the CPU cores...

...use the bash script below by copying it somewhere to your .bashrc. # Usage: ptcommits 123456 function ptcommits { if test "$1" then local PTID=$(echo "$1" | grep "[0-9]*" -o) # Allow...

} alias ptcommit='ptcommits' Now you can use use the command like this: ptcommits 165086636 --stat. Up to three arguments are passed to git show. Example output: commit 048054b1df87576f7c59cc0161cc331c44d2ea6b

bugs.ruby-lang.org

...nil inside of #m. Affected Ruby Versions Affected version: 2.2.0, 2.2.1, 2.2.2 Unaffected versions: 1.x, 2.0, 2.1, 2.2.3+, 2.3+ How to Expose it The following code exposes the bug...

...the second keyword argument Oo # - there is a double-splat argument def vulnerable_method_1(p: 'p', lost: 'lost', **options) _report(__method__, lost) end def vulnerable_method_2(p: 'p...

...error message above. There are multiple solutions to this issue. Option 0: Use Bundler 1.14 It might fix this issue, or at least print some helpful hints. Unfortunately Bundler 1.14.2...

...dumps core on corrupt Gemfiles with Ruby 1.8.7. Option 1: Make bundle install succeed now, but leave it broken for future installs This parameter will make the installation pass on...

Hey, this is foo.example.com calling. I just sent two ICMP packets to 1.2.3.4 and that failed apparently. Here is a traceroute to 1.2.3.4: HOST: foo.example.com Loss% Snt Last...

...Avg Best Wrst StDev 1.|-- 10.10.13.1 0.0% 10 0.4 0.3 0.2 0.5 0.1 2.|-- 10.179.144.1 0.0% 10 0.7 0.7 0.7 0.8 0.0 3.|-- 212.18.7.63 0.0% 10...

...ARGF.each_line { |l| m = l.match(/^INSERT INTO \`.+\` .+ VALUES \((\d+),/); puts l if !m || m[1].to_i < 200_000 || l =~ /schema_migrations/ }' | mysql -uUSER -pSECRET DATABASE_NAME The command above does...

...fails to install for Ruby 2.5 if you use a version equal or below 1.8.3. Run bundle update json --conservative to solve this issue. The backtrace you will encounter looks...

...option ‘-Wno-parentheses-equality’ Makefile:241: recipe for target 'generator.o' failed make: *** [generator.o] Error 1 make failed, exit code 2 Gem files will remain installed in /home/user/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/json-1.8.3 for inspection.

PATH=/opt/firefox-for-selenium:$PATH cucumber features/foo.feature Issues When you get the following error: ./firefox-bin: 1: Syntax error: "(" unexpected ... then you have a 32 bit Linux but downloaded a 64 bit...

...the gem from /usr/lib/ruby/gems/1.8/gems/foolib-1.2.3 to vendor/gems/foolib-1.2.3. Make sure the folder name actually ends in ...-1.2.3. cd to the gem. Check if a foolib.gemspec exists. If it doesn't, run rake...

...allocate SQLHENV from /usr/lib/ruby/1.8/dbd/odbc/driver.rb:36:in `connect' from /usr/lib/ruby/1.8/dbi/handles/driver.rb:33:in `connect' from /usr/lib/ruby/1.8/dbi.rb:148:in `connect' from (irb):1 from /usr/local/lib/site_ruby/1.8/rubygems/dependency_list.rb:14 I installed the gem ruby-odbc instead...

...store its content in a buffer and write it into the file system every 1000 lines. This will come back to bite you when using Rails.logger.info to write log output...

...to write after each line. On production environments the Rails logger writes only every 1000 lines -- and not upon shell or script termination as you might expect -- so Rake tasks...

...which opens two database connections and uses active record for the legacy system, too: 1. Add you database information to you config/database.yml. data_migration: database: your_application_data_migration...

...in the migration models, e.g. app/data_migration/user.rb. class DataMigration::MigrationUser < DataMigration::MigrationRecord self.table_name = 'zz_1234_0' # you will need this if the table name is not data_migration_migration_users...

...time you run the rake task to rebuild your po files. Holy cow! Fix 1: Cheat Use the following hack to define classes inside your scripts and trick the gem...

...this step by step, do not just copy the whole thing into the console! # 1. Get old paths by doing something like this on the console: old_paths = ModelWithAttachment.all.collect { |m...

...jO4MJ316YleW9RCxp4TM5Eid5df30RCzN3rYlnIpyB0= is the same as the value in your cookie: { "session_id"=>"8ef662867ab2457717ba74c143c08733", "timestamp"=>1572261371, "_csrf_token"=>"jO4MJ316YleW9RCxp4TM5Eid5df30RCzN3rYlnIpyB0=" } Note: The session cookie is encrypted by default. You can decrypt it...

...that CSS selectors cannot do, add the following selector in selectors.rb: when /^"(.+?)" \(xpath\)$/ [:xpath, $1] Then use it like this: Then I should see "Application title" in the page source...

...which we were using for most Rails 2.3 projects, does not run on Ubuntu 14.04 any more. Here is how to update affected projects. Update (or create) .firefox-version with...

...with these versions: gem 'sanitize', '< 3' # 3+ depends on crass which depends on Ruby 1.9 gem 'cucumber_factory' Run bundle update on any added/changed gem, e.g. bundle update cucumber capybara...

Travis changed their default distribution from Ubuntu 14.04 (trusty) to 16.04 (precise). This might break your test setup for new builds. You can solve this issue by freezing your test...

...distribution in the .travis.yml to Ubuntu 14.04 until you have the time to solve all the issues you will have in 16.04: dist: trusty Error details Here are few indicators...

...I was asked to check my yarn integrity: error Integrity check failed error Found 1 errors. ======================================== Your Yarn packages are out of date! Please run `yarn install --check-files` to...

...bit ASCII value or UTF-8 codepoint (0-127) you can use Integer#chr: 116.chr # => "t" To get a character for values larger than 127, you need to pass the...

...intuitive, but does not require passing an encoding option. You need the U* directive. [116].pack('U*') # => "t" [252].pack('U*') # => "ü" Note that you must wrap your value numbers...

martin-riedl.de

...HLS, filled with real-world examples. Using FFmpeg as a HLS streaming server (Part 1) – HLS Basics Using FFmpeg as a HLS streaming server (Part 2) – Enhanced HLS Segmentation

page.execute_script <<-JS field = $('#{field[:id]}') field.blur() field.fire('autocomplete:done') JS sleep 1 end In the javascript: /* * Listening on "blur" events does not work in tests because Firefox...