Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
class Liquify | |
attr_accessor :content, :template | |
class ::InvalidInputException < Exception; end; | |
def initialize(content) | |
@content = content | |
end | |
def template |
module FullSearchable | |
def searchable(scope_name, *attrs) | |
raise ArgumentError if attrs.blank? | |
define_singleton_method("#{scope_name}") do |terms| | |
return if terms.blank? | |
composed_scope = self.scoped | |
terms.downcase.split(' ') .each do |term| | |
composed_scope = composed_scope.where(create_query(attrs, term)) |
//Backbone Baseview for handling zombies in large applications | |
//From Backbone Fundamentals by Addy Osmani | |
var BaseView = function(options){ | |
this.bindings = []; | |
Backbone.View.apply(this.[options]); | |
}; | |
_.extend(BaseView.prototype, Backbone.View.prototype, { | |
bindTo: function(model, ev, callback){ |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
require 'sinatra' | |
require 'action_mailer' | |
class Mailer < ActionMailer::Base | |
def contact | |
mail( | |
:to => "[email protected]", | |
:from => "[email protected]", | |
:subject => "Test") do |format| | |
format.text |
//This is an example of how to scrape the web using PhantomJS and jQuery: | |
//source: http://snippets.aktagon.com/snippets/534-How-to-scrape-web-pages-with-PhantomJS-and-jQuery | |
//http://phantomjs.org/ | |
var page = new WebPage(), | |
url = 'http://localhost/a-search-form', | |
stepIndex = 0; | |
/** | |
* From PhantomJS documentation: |
values: | |
- "AAA" | |
- "AARP" | |
- "ABARTH" | |
- "ABB" | |
- "ABBOTT" | |
- "ABBVIE" | |
- "ABC" | |
- "ABLE" | |
- "ABOGADO" |
class Numbers | |
extend Piliponi | |
def self.csv_to_array(num_array, map_num) | |
num_array.collect{ |num| clean num[map_num] } | |
end | |
def self.rejected(numbers) | |
numbers.select{ |num| !plausible? num } | |
end |
var config = require("../config/config.js") | |
function getUrl(name) { | |
return "http://" + config.ip + ":3003/media/" + name | |
} | |
video1 = { | |
id: 1, | |
transitions: { | |
initial: getUrl(""), |
Story Creation: | |
{ | |
"kind": "story_create_activity", | |
"guid": "1081752_16", | |
"project_version": 16, | |
"message": "Ace Dimasuhid added this feature", | |
"highlight": "added", | |
"changes": [ | |
{ | |
"kind": "story", |