- phx_gen_auth - https://github.com/aaronrenner/phx_gen_auth
- scrivener_ecto - https://github.com/darraghenright/scrivener_ecto
- phx_tailwind_generators - https://github.com/wintermeyer/phx_tailwind_generators
| abstract class LocationsCommand[S](implicit mf: Manifest[S]) extends ModelCommand[S] with JsonCommand {} | |
| class CreateLocationCommand extends LocationsCommand[Location] { | |
| protected implicit val jsonFormats = DefaultFormats | |
| val name: Field[String] = asString("name").notBlank.minLength(3) | |
| val jobs: Field[Int] = asInt("jobs").greaterThan(0) | |
| val coordinates: Field[List[Coordinate]] = asType[List[Coordinate]]("coordinate") | |
| } |
| class LocationsController(val swagger:Swagger) extends HullCityPlanApiStack with JacksonJsonParsing with JacksonJsonSupport { | |
| implicit val jsonFormats = DefaultFormats+ new ObjectIdSerializer | |
| var locationService = new LocationService() | |
| mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true) | |
| ... | |
| } |
| # -*- coding: utf-8 -*- | |
| $:.unshift("/Library/RubyMotion/lib") | |
| require 'motion/project/template/ios' | |
| require "rubygems" | |
| require 'bundler' | |
| require 'bubble-wrap/media' | |
| Bundler.require | |
| Motion::Project::App.setup do |app| |
| # == Paperclip without ActiveRecord | |
| # | |
| # Simple and lightweight object that can use Paperclip | |
| # | |
| # | |
| # Customized part can be extracted in another class which | |
| # would inherit from SimplePaperclip. | |
| # | |
| # class MyClass < SimplePaperclip | |
| # attr_accessor :image_file_name # :<atached_file_name>_file_name |
| import Ember from "ember"; | |
| export default Ember.Object.extend({ | |
| open: function(authentication){ | |
| var userId = authentication.userId; | |
| var token = authentication.accessToken; | |
| var store = this.get('store'); | |
| return new Ember.RSVP.Promise(function(resolve, reject){ | |
| Ember.$.ajax({ | |
| type: "POST", |
| defimpl Poison.Encoder, for: Timex.DateTime do | |
| use Timex | |
| def encode(d, _options) do | |
| fmt = Timex.format!(d, "{ISO}") | |
| "\"#{fmt}\"" | |
| end | |
| end |
| check process {{app_name}} MATCHING "{{app_name}}.sh" | |
| start program = "/bin/su - {{ deployer_user }} -c '{{app_dir}}/bin/{{app_name}} start'" | |
| stop program = "/bin/su - {{ deployer_user }} -c '{{app_dir}}/bin/{{app_name}} stop'" |