- 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
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'" |
defimpl Poison.Encoder, for: Timex.DateTime do | |
use Timex | |
def encode(d, _options) do | |
fmt = Timex.format!(d, "{ISO}") | |
"\"#{fmt}\"" | |
end | |
end |
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", |
# == 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 |
# -*- 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| |
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) | |
... | |
} |
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") | |
} |
package uk.co.cd4i.cityplan.domain.mongo | |
import java.util.Date | |
import com.novus.salat.annotations._ | |
import com.novus.salat.dao.SalatDAO | |
import com.mongodb.casbah.Imports._ | |
import com.novus.salat.global._ | |
case class Milestone ( | |
@Key("_id") id: Object = new ObjectId, |
return GoCardless.new_pre_authorization_url amount: Settings.max_variable_direct_debit_amount, name: order.name, interval_unit: "month", interval_length: 12, state: member.id, | |
user: { | |
first_name: member.first_name, | |
last_name: member.last_name, | |
email: member.email, | |
billing_address1: member.correspondence_address_line_1, | |
billing_address2: member.correspondence_address_line_2, | |
billing_town: member.correspondence_address_city, | |
billing_postcode: member.correspondence_address_postcode | |
} |