Skip to content

Instantly share code, notes, and snippets.

@taufik-nurrohman
taufik-nurrohman / ckeditor5-image-upload.js
Last active February 6, 2023 17:04
Enable image upload in CKEditor 5 without using the Easy Image service.
/**
* This code is based on <https://github.com/pourquoi/ckeditor5-simple-upload>
* and will be implemented by <https://github.com/mecha-cms/extend.c-k-editor> in the future!
*/
// The upload adapter
var Adapter = function(loader, urlOrObject, t) {
var $ = this;
@ryanzhou
ryanzhou / pf.md
Last active October 21, 2019 03:52
Getting Pow to work in OS X Yosemite

Getting Pow to work in OS X Yosemite

Some parts taken from: https://gist.github.com/kujohn/7209628

ipfw is officially deprecated and removed in OS X Yosemite. Pow requires another program pf to handle the port forwarding.

1. Anchor file

Create file /etc/pf.anchors/pow

Security is Hard

Massive Assignment

  • watch for ActiveRecord Relation, like has_many, has_many :through
  • watch for user_roles, `group_users
  • UPDATE action

Admin