cd ~/.asdf/installs/ruby/3.2.6/lib/ruby/3.2.0/net
git apply --directory=. /path/to/http_loggers.patchTrigger network requests
cd /rails/root/directory
cat log/development.log | grep -A3 "\[HTTP_"| git fetch | |
| git checkout LATEST_COMMIT_SHA_WITH_BASE_BRANCH_MASTER | |
| git log --merges -n 1 | |
| # this returns LATEST_MASTER_MERGE_COMMIT_SHA | |
| git rev-parse LATEST_MASTER_MERGE_COMMIT_SHA^2 | |
| # this returns LATEST_MASTER_SHA | |
| git diff origin/RELEASE_XYZ --ignore-all-space -- $(git diff LATEST_MASTER_SHA --name-only) | |
| # in red it shows the final version on RELEASE_XYZ branch | |
| # in green it shows changes that you had in your branch that did not make it into the RELEASE_XYZ branch |
cd ~/.asdf/installs/ruby/3.2.6/lib/ruby/3.2.0/net
git apply --directory=. /path/to/http_loggers.patchTrigger network requests
cd /rails/root/directory
cat log/development.log | grep -A3 "\[HTTP_"| #!/usr/bin/env bash | |
| # replace ruby version and possibly path in the commands below | |
| sed_line=$(grep -n "def delete" /opt/ruby/lib/ruby/3.2.0/net/http.rb | cut -d : -f 1) | |
| sed -i "$sed_line"' a Rails.logger.warn("[HTTP][DELETE]: #{self.class.name}.#{__method__} called for path: #{path},\\n backtrace: #{Rails.backtrace_cleaner.clean(caller).join("|")}")' /opt/ruby/lib/ruby/3.2.0/net/http.rb | |
| sed_line=$(grep -n "def put" /opt/ruby/lib/ruby/3.2.0/net/http.rb | cut -d : -f 1) | |
| sed -i "$sed_line"' a Rails.logger.warn("[HTTP][PUT]: #{self.class.name}.#{__method__} called for path: #{path},\\n data: #{data},\\n backtrace: #{Rails.backtrace_cleaner.clean(caller).join("|")}")' /opt/ruby/lib/ruby/3.2.0/net/http.rb |
| # Instructions for darwin coreutils | |
| # credits: https://stackoverflow.com/questions/3840908/how-do-i-see-the-differences-between-2-mysql-dumps | |
| cd /to/appropriate/working/dir | |
| docker exec -ti mysql5.7 /bin/bash | |
| > mysqldump --skip-opt DB_NAME > prior.sql | |
| > exit | |
| docker cp mysql5.7:/prior.sql prior.sql | |
| sed -i='' -e "s/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/0000-00-00 00:00:00/g" prior.sql |
First creation date: 2025-04-20
Latest update date: 2025-04-24
Changelog
| module ArelHelpers | |
| extend self | |
| def self.included(base) | |
| base.extend self | |
| end | |
| def asterisk(arel_table_or_model) | |
| arel_table, columns = case arel_table_or_model | |
| when Arel::Table |
Requires installation of Node.js
Put these files into a directory, run npm install to install dependencies
Use ssh -R 80:localhost:8080 localhost.run to setup a temporary tunnel to your local machine, leave that shell open
Copy & paste the publicly accessible tunnel url that will be established, e.g. https://XXX.lhrtunnel.link
Open Google Search Console and create a new URL prefix property with that tunnel link
Use the meta tag verification method and paste it into the project's index.html file's header
| // ==UserScript== | |
| // @name YouTube restore video time | |
| // @namespace Violentmonkey Scripts | |
| // @match https://*.youtube.com/* | |
| // @grant none | |
| // @version 1.0 | |
| // @author mucaho | |
| // @description - | |
| // ==/UserScript== |
| async function main() { | |
| const rej = Promise.reject('err') | |
| // the following line is needed, | |
| // otherwise UnhandledPromiseRejectionWarning is thrown | |
| // which can't be caught anywhere else (not even by async caller)! | |
| // can be NOOP though, if error handling may be delayed to below catch block | |
| rej.catch(e => console.log(e)) // logs 'err' | |
| const del = new Promise((resolve) => { | |
| setTimeout(() => resolve('del'), 100) |