Skip to content

Instantly share code, notes, and snippets.

View frankyston's full-sized avatar
🎯
Ruby on Rails is Fun

Frankyston Lins frankyston

🎯
Ruby on Rails is Fun
View GitHub Profile
@ingeniousgenius
ingeniousgenius / README.md
Last active December 15, 2025 22:37
JWT Auth + Refresh Tokens in Rails

JWT Auth + Refresh Tokens in Rails

This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.

I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)

Before trying it out DIY, I considered using:

@orafaelfragoso
orafaelfragoso / twitter_search.js
Created March 9, 2020 22:58
Fetch Twitter API Recursively
const Twitter = require('twitter')
const fs = require('fs')
const client = new Twitter({
consumer_key: '',
consumer_secret: '',
access_token_key: '',
access_token_secret: '',
})
@stettix
stettix / things-i-believe.md
Last active August 11, 2026 09:09
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@brunonepomuceno
brunonepomuceno / ripple-effect.markdown
Last active June 11, 2020 01:55
Ripple effect em CSS puro
@renankof
renankof / teste_intersection.py
Last active January 23, 2019 12:51
Comparativo entre set Intersection e buscas em diferentes representações de dados Python3.
#!/usr/bin/python3
import random
import time
row_count = 10000000
my_list = {random.randint(0, 2000): random.randint(0, 255) for i in range(row_count)}
my_list2 = {random.randint(0, 2000): random.randint(0, 255) for i in range(row_count)}
@gregblass
gregblass / trix_editor_input.rb
Last active July 14, 2023 10:00
Trix Editor custom form input component for SimpleForm
# I was using https://github.com/maclover7/trix to do:
#
# f.input :my_input, as: :trix_editor
#
# Its currently been over two weeks since Rails 5.2 was released, and the
# gem was the only thing preventing me from using it in multiple projects:
# https://github.com/maclover7/trix/pull/61#issuecomment-384312659
#
# So I made this custom simpleform input for my apps to prevent this from happening again in the future.
#
@lauraturk
lauraturk / circleci-heroku-continuous-deployment2.0.md
Last active November 23, 2021 15:28
instructions for deploying from circleci2.0 to heroku
@amratab
amratab / heroku_multiple_remotes_multiple_branches
Created May 30, 2017 04:30
Adding multiple heroku apps to a single repository different branches
Suppose you have two heroku remote apps
myapp-dev & myapp-prod
and two git branches
master(for dev) & production
Now lets setup heroku on the existing git repo in your local machine
Assuming the branches and the apps exist already
git remote add heroku-myapp-dev https://git.heroku.com/myapp-dev.git
git remote add heroku-myapp-prod https://git.heroku.com/myapp-prod.git
@rmosolgo
rmosolgo / Gemfile
Last active March 27, 2023 08:38
GraphQL Ruby Subscriptions
source 'https://rubygems.org'
gem "graphql", github: "rmosolgo/graphql-ruby", branch: "subscriptions"
gem "sinatra"
gem "thin"
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active February 24, 2026 08:35
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear