Skip to content

Instantly share code, notes, and snippets.

View SunDi3yansyah's full-sized avatar
Verified

Cahyadi Triyansyah SunDi3yansyah

Verified
View GitHub Profile
@ShvaykaD
ShvaykaD / upgrade-postgresql-service-centos-7.md
Created May 4, 2020 16:29
Upgrading PostgreSQL service from 9.x or 10.x to 11 version on CentOS 7
View upgrade-postgresql-service-centos-7.md
@jesster2k10
jesster2k10 / README.md
Last active February 21, 2024 14:44
JWT Auth + Refresh Tokens in Rails
View README.md

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:

@OrionUnix
OrionUnix / Sublime Text 3.2.2 Build 3211 key licence
Last active January 9, 2024 11:53
Sublime Text 3.2.2 Build 3211 key licence
View Sublime Text 3.2.2 Build 3211 key licence
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@ArturT
ArturT / main.yaml
Last active November 9, 2022 06:10
GitHub Actions - how to run parallel tests in RSpec for Ruby on Rails project. See article how to run RSpec on GitHub Actions for Ruby on Rails app using parallel jobs https://docs.knapsackpro.com/2019/how-to-run-rspec-on-github-actions-for-ruby-on-rails-app-using-parallel-jobs or sign up at https://knapsackpro.com/?utm_source=github&utm_medium=…
View main.yaml
# .github/workflows/main.yaml
name: Main
on: [push]
jobs:
test:
runs-on: ubuntu-latest
# If you need DB like PostgreSQL, Redis then define service below.
@SunDi3yansyah
SunDi3yansyah / README.md
Last active August 18, 2019 04:42
Rails Indonesia Installation with RVM | https://rails.id/install/
View README.md

Instalasi Ruby dan Rails

@SunDi3yansyah
SunDi3yansyah / README.md
Last active November 29, 2018 17:51
Find Gems on Repository with Scraping
View README.md

Find Gems on Repository with Scraping

Get Gems from Local

~/ruby via 💎 v2.5.3 
➜ gem list --no-versions

then put in array gems.rb

@SunDi3yansyah
SunDi3yansyah / README.md
Last active September 8, 2023 15:10
Cara Install Secure Nginx dengan Let's Encrypt di CentOS 7
View README.md

Step 1 — Installing the Certbot Let's Encrypt Client

sudo yum install epel-release
sudo yum install certbot-nginx

Step 2 — Setting up Nginx

sudo yum install nginx
@SunDi3yansyah
SunDi3yansyah / git-hooks.md
Last active June 25, 2019 12:34
Git Hooks
View git-hooks.md

Git Hooks

On server for git hook

mkdir /git
cd /git
mkdir repository/app.git -p
cd repository/app.git
git init --bare
cd hooks
@SunDi3yansyah
SunDi3yansyah / exception_handler.rb
Last active April 30, 2019 18:10
Exception Handler in Rails => https://git.io/fjZIW
View exception_handler.rb
module ExceptionHandler
extend ActiveSupport::Concern
included do
rescue_from ActionController::Base,
ActionController::API,
# ActionController::Middleware,
ActionController::Streaming,
ActionController::LogSubscriber,
ActionController::TestCase,
@maxivak
maxivak / webpacker_rails.md
Last active April 13, 2023 18:46
Webpack, Yarn, Npm in Rails
View webpacker_rails.md