Skip to content

Instantly share code, notes, and snippets.

@kinsomicrote
kinsomicrote / tinymce-react-nextjs.md
Created January 18, 2021 13:18 — forked from zhangshine/tinymce-react-nextjs.md
NextJs- React - Self hosted TinyMCE
  1. Install (TinyMCE 5.x)
npm install --save tinymce @tinymce/tinymce-react copy-webpack-plugin
  1. Copy static files(tinymce skins) to public folder. Edit file next.config.js
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
@kinsomicrote
kinsomicrote / banks.json
Created April 10, 2023 20:51 — forked from LordGhostX/banks.json
List of Nigerian Banks and Codes
{
"Access Bank": "044",
"Access Bank (Diamond)": "063",
"ALAT by WEMA": "035A",
"ASO Savings and Loans": "401",
"Bowen Microfinance Bank": "50931",
"CEMCS Microfinance Bank": "50823",
"Citibank Nigeria": "023",
"Ecobank Nigeria": "050",
"Ekondo Microfinance Bank": "562",
@kinsomicrote
kinsomicrote / README.md
Created April 28, 2023 17:46 — forked from masterT/README.md
RequestForgeryProtection for ActionController::API

Configure ActionController::RequestForgeryProtection for an ApplicationController that does not inherits from ActionController::Base (or any controller that does not include ActionController::RequestForgeryProtection).

This is required since the module is included after the application is loaded, so it does not get configured automatically by the configuration files config/environments/*.rb.

@kinsomicrote
kinsomicrote / log_request_header.rb
Created January 6, 2024 08:38
rails http header
before_action :log_request
def log_request
Rails.logger.info "Request: #{request.method} #{request.fullpath}"
http_envs = {}.tap do |envs|
request.headers.each do |key, value|
envs[key] = value if key.downcase.starts_with?('http')
end
end