Skip to content

Instantly share code, notes, and snippets.

View darylenriquez's full-sized avatar
:octocat:
Focusing

Daryl Kinichon Enriquez darylenriquez

:octocat:
Focusing
View GitHub Profile
@darylenriquez
darylenriquez / file.txt
Created January 4, 2024 07:35
moving graphql out of the monorepo
#################################################
# 1. clone the target repo into a new place
➜ experiments git clone git@github.com:aqua/my-frontend.git web-funnel-graphql-test
Cloning into 'web-funnel-graphql-test'...
remote: Enumerating objects: 43838, done.
remote: Counting objects: 100% (7457/7457), done.
remote: Compressing objects: 100% (1987/1987), done.
remote: Total 43838 (delta 5662), reused 6889 (delta 5269), pack-reused 36381
@darylenriquez
darylenriquez / facebook.yml
Created February 8, 2017 05:40
Using Koala to fetch and put data on Facebooks Graph API
// This is just sample
app_id: 492347987394
secret: erweoryc98b48348753285873624875c83
@darylenriquez
darylenriquez / recorded_logger.rb
Last active October 25, 2016 05:23
Catching Logs of Rails Logger
# So I needed to catch the logs on a certain action when a certain condition is met.
# I am a bit lazy to find solutions or gems for this and there probably is.
# I decided to create order of logic:
# I will have a method for setting if the recording should start, and a method if recording should stop
# I will need a variable to store the recorded items and a method to retrieve it.
module LogRecorder
RECORD_LIMIT = 1_000
def started_recording?
@darylenriquez
darylenriquez / method_chain_to_prepend.rb
Last active July 22, 2017 13:21
changing alias_method_chain to prepend
# A simplified explanation for moving alias_method_chain to prepend
# Sample class
class Note
def show_id
puts self.object_id
end
end
# using alias_method_chain: