Skip to content

Instantly share code, notes, and snippets.

View savin-alexey's full-sized avatar

Alexey Savin savin-alexey

  • Barcelona, Spain
View GitHub Profile
import UploadAdapter from './upload_adapter';
function CustomUploadAdapterPlugin( editor ) {
editor.plugins.get( 'FileRepository' ).createUploadAdapter = ( loader ) => {
// Configure the URL to the upload script in your back-end here!
return new UploadAdapter( loader, editor );
};
}
import { Controller } from "stimulus"
@komasaru
komasaru / push_controller.rb
Created October 29, 2013 06:16
Rails controller to receive feeds from the Hub of PubSubHubbub.
class JmxController < ApplicationController
DATA_DIR = "/path/to/jmx/data/"
VERIFY_TOKEN = "hoge"
# application_controller 内の
# "protect_from_forgery with: :exception"
# を無効にする設定
# (ワーニングが出力されないようにするため)
skip_before_filter :verify_authenticity_token