Skip to content

Instantly share code, notes, and snippets.

View aramboyajyan's full-sized avatar

Aram Boyajyan aramboyajyan

View GitHub Profile
@aramboyajyan
aramboyajyan / selectable-draggable.js
Created May 26, 2018 13:08
Combining jQuery UI selectable and draggable
$(function () {
'use strict';
var selected = $([]), offset = {top: 0, left: 0};
$("#container").selectable();
$("#container div").draggable({
snap : true,
start: function () {
if (!$(this).is(".ui-selected")) {
$(".ui-selected").removeClass("ui-selected");
}
@aramboyajyan
aramboyajyan / JS
Last active December 11, 2015 22:08 — forked from jakeonrails/Ruby Notepad Bookmarklet
Code editor bookmarklets. Just copy the code and paste it in the browser URL. It will load ACE editor with the mode you choose for the language.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/javascript");</script>