SSH into your server at root:
ssh root@myserver.com
Crate a new user:
adduser my_username
Make the new user a sudo user:
// In app.js | |
require("./config/routes")(app, passport); | |
// In /config/routes.js | |
module.exports = function(app, passport) { | |
[ | |
"users", | |
"sessions", | |
"stories" | |
].forEach(function (routeName) { |
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; |
## 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](https://gist.github.com/bradley/0c06d3f2d3c63b097ea5e27befd4beb3) 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 myapp.mydomain.com. 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 mydomain.com`. | |
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 |
= raw (@employee.documents.active.map do |document| | |
- link_to document.display_name, document.file.expiring_url | |
- end.join(", ")) |
/* 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']; |
// Playground - noun: a place where people can play | |
import Foundation | |
class Regex { | |
let internalExpression: NSRegularExpression | |
let pattern: String | |
init(_ pattern: String) { | |
self.pattern = pattern |
// =========== 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();}); |
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; |