View blotter_channelsplitmaterial_hover_example.js
function angleBetweenPointsInDegrees(x1, y1, x2, y2) {
var angle = Math.atan2(y2 - y1, x2 - x1) * 180.0 / Math.PI;
angle = 180 + angle;
return angle;
function distanceBetweenPoints(x1, y1, x2, y2) {
var a = x1 - x2;
View Dokku On Digital Ocean
## Bare Bones
1. Create your droplet, adding the 1-click install dokku app and giving it at least 1GB memory which Dokku will need for deployment, then navigate to your server's IP and complete the process in the dokku form that will exist there. Also be sure you've followed the guide [here]( to set up the various accounts youll need on your ubuntu server correctly before proceeding.
2. SSH into your droplet: `ssh root@droplet-ip`
3. Create your dokku app: `dokku apps:create app-name`
4. By default your app is located at If you want your app to be accessible via the root domain, then just add the root domain as one of your app's domains. `dokku domains:add app-name`.
5. On your local machine, in your project’s Git repository, add your droplet as a remote: `git remote add dokku dokku@droplet-ip:app-name`
6. Dokku will start your node app itself by calling `nmp start` but if you want to modify that create a `Procf
View Digital Ocean SSH and Subdomains
### Basic Getting Started Ubuntu 16.04
SSH into your server at root:
Crate a new user:
adduser my_username
Make the new user a sudo user:
View map_join.html.haml
= raw ( do |document|
- link_to document.display_name, document.file.expiring_url
- end.join(", "))
View Deadjs.js
/* requestAnimationFrame polyfill
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
|| window[vendors[x]+'CancelRequestAnimationFrame'];
View gist:ed290aab1a2f5cfb21d1
// Playground - noun: a place where people can play
import Foundation
class Regex {
let internalExpression: NSRegularExpression
let pattern: String
init(_ pattern: String) {
self.pattern = pattern
View gist:2484138
// =========== Input Field Listener with AJAX Callback ==============
function FieldListener(entity){
var t = this;
this.typingTimer; // Timer identifier
this.doneTypingInterval = 750; // Time in ms. e.g.; 5000 = 5secs
this.entity = entity;
this.noticeSpan = this.entity.siblings("span");
this.parentForm = entity.parents('form:first');
entity.on("keyup", function(){t.setTimer();});
View dabblet.css
* The first commented line is your dabblet’s title
background: #f06;
background: linear-gradient(45deg, #f06, yellow);