In your command-line run the following commands:
brew doctorbrew update
In your command-line run the following commands:
brew doctorbrew updateBut really this is just a goofy name for one of many options of dynamically creating methods in ruby which is part of that fancy business known as Metaprogramming. Which is a fancy name for the concept of writing code that 'writes' code. It's bananas and great and the best thing you will ever see in your career also it is terrible, horrible, no good and the worst thing you will ever see in your career. We are just going to go over what has been dubbed 'ghost' methods by someone who likes to have cool names for things, there is a lot more to metaprogramming in general than just this technique but it is a pretty good entry point.
| # Based on: | |
| # http://unscriptable.com/2009/03/20/debouncing-javascript-methods/ | |
| debounce = (func, threshold, execAsap) -> | |
| timeout = null | |
| (args...) -> | |
| obj = this | |
| delayed = -> | |
| func.apply(obj, args) unless execAsap | |
| timeout = null |
This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).
This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"| #List of product ids in sorted order. Get from jqueryui sortable plugin. | |
| #product_ids = [3,1,2,4,7,6,5] | |
| #product_ids.each_with_index do |id, index| | |
| # Product.where(id: id).update_all(sort_order: index+1) | |
| #end | |
| ##CASE syntax example: | |
| ##Product.where(id: product_ids).update_all("sort_order = CASE id WHEN 539 THEN 1 WHEN 540 THEN 2 WHEN 542 THEN 3 END") |
| https://rfc3161.ai.moda | |
| https://rfc3161.ai.moda/adobe | |
| https://rfc3161.ai.moda/microsoft | |
| https://rfc3161.ai.moda/apple | |
| https://rfc3161.ai.moda/any | |
| http://rfc3161.ai.moda | |
| http://timestamp.digicert.com | |
| http://timestamp.globalsign.com/tsa/r6advanced1 | |
| http://rfc3161timestamp.globalsign.com/advanced | |
| http://timestamp.sectigo.com |
| #!/usr/bin/env ruby | |
| require "openssl" | |
| require "time" | |
| begin | |
| require "origami" | |
| rescue LoadError | |
| abort "origami not installed: gem install origami" | |
| end |
| def fill_stripe_elements(card) | |
| using_wait_time(15) { within_frame('stripeField_card_element0') do | |
| card.to_s.chars.each do |piece| | |
| find_field('cardnumber').send_keys(piece) | |
| end | |
| find_field('exp-date').send_keys("0122") | |
| find_field('cvc').send_keys '123' | |
| find_field('postal').send_keys '19335' | |
| end } |