profile
viewpoint
Juanito Fatas JuanitoFatas @Buildkite Kyoto, Japan https://juanitofatas.com 🐻

gjtorikian/html-pipeline 2147

HTML processing filters and utilities

gel-rb/gel 611

A modern gem manager

JuanitoFatas/active_sample 62

I'm feeling lucky! :game_die:

choonkeat/active_waiter 54

allow your users to wait for the completion of your `ActiveJob`

halogenandtoast/dagon 27

The programming language of the elder gods.

JuanitoFatas/active_error 25

Create an exception with backtrace has never been easier :heart:

JuanitoFatas/active_loader 22

:open_file_folder: Load YAML and JSON easily and safely with Active Loader.

JuanitoFatas/bin 4

My ~/bin and small scripts, written in Ruby <3

JuanitoFatas/99bottles-demo 3

TDD for 99bottles by Sandi Metz

pull request commentsj26/homebrew-postgresql-extensions

pg_cron formula

I installed via the formula and it worked:

brew install pg_cron
==> Downloading https://github.com/citusdata/pg_cron/archive/refs/tags/v1.3.0.tar.gz
Already downloaded: /Users/hhh/Library/Caches/Homebrew/downloads/19e732dcb1695fdc81b67f7575979b4ddc1fa88c42ff22f61440b2756f57c8d5--pg_cron-1.3.0.tar.gz
==> Installing pg_cron from sj26/postgresql-extensions
==> make
==> make install DESTDIR=/private/tmp/pg_cron-20211130-62155-3cqqet/pg_cron-1.3.0/stage
==> Caveats
You must edit your postgresql configuration and set the following
parameters, modified as needed:

shared_preload_libraries = 'pg_cron'

cron.database_name = 'postgres'

The file can be found here for the default configuration:

/usr/local/var/postgres/postgresql.conf

Then restart your postgresql server:

brew services restart postgresql
==> Summary
🍺  /usr/local/Cellar/pg_cron/1.3.0: 11 files, 97.7KB, built in 4 seconds

Thanks @sj26 🙌🏼

JuanitoFatas

comment created time in 21 hours

delete branch JuanitoFatas/homebrew-postgresql-extensions

delete branch : pg_cron

delete time in a day

PullRequestReviewEvent
PullRequestReviewEvent

push eventJuanitoFatas/homebrew-postgresql-extensions

Juanito Fatas

commit sha c14c7ec97d4c002c11d7b5a8ebacb1cf8a51c343

WIP: pg_cron formula

view details

push time in 13 days

PR opened sj26/homebrew-postgresql-extensions

WIP: pg_cron formula

This Pull Request adds a formula for pg_cron.

+69 -0

0 comment

1 changed file

pr created time in 13 days

create barnchJuanitoFatas/homebrew-postgresql-extensions

branch : pg_cron

created branch time in 13 days

Pull request review commentbuildkite/rspec-buildkite-analytics

Move send to background thread

 def initialize(section, start_at, end_at, detail)         @children = []       end -      def as_json+      def as_hash         {           section: section,           start_at: start_at,           end_at: end_at,           duration: end_at - start_at,           detail: detail,-          children: children.map(&:as_json),-        }+          children: children.map(&:as_hash),+        }.with_indifferent_access

In #63 I was avoiding using AS methods though, because for some reason they weren't being added to DateTime in my non-rails app. Possibly because my app didn't require date?

DateTime.current is a Rails extension so not available in non-Rails app.

niceking

comment created time in 15 days

PullRequestReviewEvent

Pull request review commentbuildkite/rspec-buildkite-analytics

Move send to background thread

 def initialize(section, start_at, end_at, detail)         @children = []       end -      def as_json+      def as_hash         {           section: section,           start_at: start_at,           end_at: end_at,           duration: end_at - start_at,           detail: detail,-          children: children.map(&:as_json),-        }+          children: children.map(&:as_hash),+        }.with_indifferent_access

Ooops sorry I did not read the Pull Request in depth. We can still use with_indifferent_access 👍🏼

niceking

comment created time in 15 days

PullRequestReviewEvent

Pull request review commentbuildkite/rspec-buildkite-analytics

Move send to background thread

 def initialize(section, start_at, end_at, detail)         @children = []       end -      def as_json+      def as_hash         {           section: section,           start_at: start_at,           end_at: end_at,           duration: end_at - start_at,           detail: detail,-          children: children.map(&:as_json),-        }+          children: children.map(&:as_hash),+        }.with_indifferent_access

Active Support dependency got removed in https://github.com/buildkite/rspec-buildkite-analytics/pull/63 — So we need to do this in Ruby hmm

niceking

comment created time in 15 days

PullRequestReviewEvent

delete branch JuanitoFatas/rails

delete branch : guide/association_basics/primary-key-link

delete time in 19 days

push eventJuanitoFatas/rails

fatkodima

commit sha a9ce957db96bc5d9d36a7d9302c2712c4d1a25ed

Add a note that index length is supported only by MySQL [skip ci]

view details

Ryuta Kamizono

commit sha e3a58c85ea3f6432c8f48c7b3b17ca0d6571de43

Merge pull request #43630 from fatkodima/index-length-mysql Add a note that index length is supported only by MySQL [skip ci]

view details

Juanito Fatas

commit sha 1ef5ffef0a115406c9d4ff5246b27e63d1430422

[ci skip] Fix link to Primary key

view details

push time in 19 days

PR opened rails/rails

Guide: Fix link to Primary key in Active Record Associations

Summary

Came across this and thought it should link to https://en.wikipedia.org/wiki/Primary_key instead.

Other Information

N/A

+1 -1

0 comment

1 changed file

pr created time in 20 days

create barnchJuanitoFatas/rails

branch : guide/association_basics/primary-key-link

created branch time in 20 days

startedthrottled/gcra

started time in 21 days

push eventJuanitoFatas/bin

Juanito Fatas

commit sha 19947dfb07f83f1934a4912547908b629b783c93

Avoid curl if we could already compose URL

view details

push time in 22 days

push eventJuanitoFatas/bin

Juanito Fatas

commit sha 822858ceb5fbdb57f7a13b1379e983bc481171de

Create add_date_time

view details

Juanito Fatas

commit sha 4232164e30f7c8f1994192aada8977b003792b16

Create daf

view details

Juanito Fatas

commit sha 016f7b83bf2e264f53385ad9314fbb1968b9ffb1

Create delete_jpg_if_dng_present

view details

push time in 24 days

PullRequestReviewEvent

Pull request review commentbuildkite/rspec-buildkite-analytics

Add debug mode

 class Session     class RejectedSubscription < StandardError; end     class InitialConnectionFailure < StandardError; end +    class Logger+      def initialize+        @log = Queue.new+      end++      def write(str)+        @log << "#{Time.now.strftime("%F-%R:%S.%9N")} #{Thread.current} #{str}"+      end++      def to_array+        # This empty check is important cos calling pop on a Queue is blocking until+        # it's not empty+        if @log.empty?+          []+        else+          Array.new(@log.size) { @log.pop }

The log file looks good! 👍🏼

niceking

comment created time in a month

Pull request review commentbuildkite/rspec-buildkite-analytics

Add debug mode

 class Session     class RejectedSubscription < StandardError; end     class InitialConnectionFailure < StandardError; end +    class Logger+      def initialize+        @log = Queue.new+      end++      def write(str)+        @log << "#{Time.now.strftime("%F-%R:%S.%9N")} #{Thread.current} #{str}"+      end++      def to_array+        # This empty check is important cos calling pop on a Queue is blocking until+        # it's not empty+        if @log.empty?+          []+        else+          Array.new(@log.size) { @log.pop }

Ah what I meant is suppose we have 2 errors in @log:

@log << "error 1"
@log << "error 2"

This line will create any array of ["error 1", "error 1"] instead of ["error 1", "error 2"] right?

Is this what we want? 🤔

niceking

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentbuildkite/rspec-buildkite-analytics

Add debug mode

 class Session     class RejectedSubscription < StandardError; end     class InitialConnectionFailure < StandardError; end +    class Logger+      def initialize+        @log = Queue.new+      end++      def write(str)+        @log << "#{Time.now.strftime("%F-%R:%S.%9N")} #{Thread.current} #{str}"+      end++      def to_array+        # This empty check is important cos calling pop on a Queue is blocking until+        # it's not empty+        if @log.empty?+          []+        else+          Array.new(@log.size) { @log.pop }

Would this only pops the last element from the queue instead of all elements from the queue? 🤔

niceking

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

delete branch buildkite/rspec-buildkite-analytics

delete branch : support-file-name-feature

delete time in a month

more