First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel
Then ssh with root account, run this in termianl:
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash| # Sample implementation of quicksort and mergesort in ruby | |
| # Both algorithm sort in O(n * lg(n)) time | |
| # Quicksort works inplace, where mergesort works in a new array | |
| def quicksort(array, from=0, to=nil) | |
| if to == nil | |
| # Sort the whole array, by default | |
| to = array.count - 1 | |
| end |
| class ProductsController < ApplicationController | |
| before_filter do | |
| if params[:category_id] | |
| @product_category = Shoppe::ProductCategory.where(:permalink => params[:category_id]).first! | |
| end | |
| if @product_category && params[:product_id] | |
| @product = @product_category.products.where(:permalink => params[:product_id]).active.first! | |
| end | |
| end |
| (function() { | |
| module.exports = { | |
| /** | |
| * Before connection (optional, just for faye) | |
| * @param {client} client connection | |
| */ | |
| beforeConnect : function(client) { | |
| // Example: | |
| // client.setHeader('Authorization', 'OAuth abcd-1234'); |
| Copyright (c) 2015, Shahar Evron | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without modification, | |
| are permitted provided that the following conditions are met: | |
| 1. Redistributions of source code must retain the above copyright notice, this | |
| list of conditions and the following disclaimer. | |
| 2. Redistributions in binary form must reproduce the above copyright notice, |
| pre { | |
| var config = CONFIG!Config; | |
| var DataBase = DB!Database; | |
| var ParentTable = DB!Table; | |
| } | |
| --This Rule is creating and extra empty database | |
| rule Config2Database | |
| transform c: CONFIG!Config | |
| to db: DB!Database{ | |
| config = c ; |
| -- Debemos crear una unica base de datos para todos | |
| pre { | |
| var db : new DB!Database; | |
| } | |
| -- Esta regla se encarga de todo! | |
| rule MarketPlace2Relacional | |
| transform | |
| c : mp!ClassUnit | |
| to |
| package processor; | |
| import java.lang.annotation.Annotation; | |
| import java.math.BigInteger; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.Optional; | |
| import java.util.stream.Collectors; | |
| import annotation.FeatureAnnotation; |
| package processor; | |
| import spoon.processing.AbstractProcessor; | |
| import spoon.reflect.declaration.CtAnnotation; | |
| import spoon.reflect.declaration.CtElement; | |
| import spoon.reflect.reference.CtTypeReference; | |
| import java.lang.annotation.Annotation; | |
| import java.util.ArrayList; |