Skip to content

Instantly share code, notes, and snippets.

// bootstrap-ckeditor-modal-fix.js
// hack to fix ckeditor/bootstrap compatiability bug when ckeditor appears in a bootstrap modal dialog
//
// Include this AFTER both bootstrap and ckeditor are loaded.
// From: http://stackoverflow.com/questions/14420300/bootstrap-with-ckeditor-equals-problems
// Author: http://stackoverflow.com/users/185839/aaron
$.fn.modal.Constructor.prototype.enforceFocus = function() {
modal_this = this
$(document).on('shown.bs.modal', function (e) {
@markNehus
markNehus / multiple-uploads.md
Created March 21, 2018 17:14 — forked from WebReflection/multiple-uploads.md
Uploading multiple files at once, and without jQuery

The aim of this gist is to fix the following informative post about uploading via XHR.

Fixing the HTML

The first part is the HTML. First of all, you really don't need JavaScript to upload a file but you do need a proper form. Secondly, inputs in a form shouild have a name, because the name is what the server will receive: not IDs, names!

Following the fixed form part.

@markNehus
markNehus / unix_tricks.md
Created January 25, 2018 01:30 — forked from ackman678/unix_tricks.md
Brief command shell tutorial. Contains a few unix tips and tricks for working with and examining data files for science. A couple of the examples assume that the working environment is Mac OS X (e.g. pbcopy).