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_"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) |
| FROM node:12-alpine | |
| RUN apk add --no-cache tini | |
| RUN apk add --no-cache curl | |
| ADD https://raw.githubusercontent.com/eficode/wait-for/master/wait-for /bin/wait-for.sh | |
| RUN chmod +rx /bin/wait-for.sh | |
| USER node | |
| RUN mkdir -p /home/node/app | |
| WORKDIR /home/node/app |