Skip to content

Instantly share code, notes, and snippets.

View alexslade's full-sized avatar

Alex Slade alexslade

View GitHub Profile
May 20 01:55:34 AM Processing triggers for libc-bin (2.28-10) ...
May 20 01:55:35 AM + curl -fSL -o elixir-src.tar.gz https://github.com/elixir-lang/elixir/archive/v1.9.4.tar.gz
May 20 01:55:35 AM % Total % Received % Xferd Average Speed Time Time Time Current
May 20 01:55:35 AM Dload Upload Total Spent Left Speed
May 20 01:55:35 AM
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
May 20 01:55:35 AM curl: (60) SSL certificate problem: unable to get local issuer certificate
May 20 01:55:35 AM More details here: https://curl.haxx.se/docs/sslcerts.html
May 20 01:55:35 AM
class AlbumForm < Reform::Form
property :title, prerender: ->(options) { self.title = options[:def_title] }
end
You can then pass arbitrary arguments to prerender!.
###
form.title #=> nil
form.prerender!(def_title: "Roxanne")
alias reb='git fetch origin && git rebase origin/master'
alias pub='git push origin HEAD'
(defn update-input [val input]
(reset! val (-> input .-target .-value)))
(defn new-contact []
(let [val (r/atom "")]
(fn []
[:div
[:input {:type "text"
:placeholder "Contact Name"
:value @val
(defn new-contact []
(let [val (r/atom "")]
(fn []
[:div
[:input {:type "text"
:value @val
:on-change #(reset! val (-> % .-target .-value))}]])))
; Works fine
def create
card_saver = Billing::SaveCreditCard.new(user: current_user, card: card_params)
responder = respond do |r|
r.success { render :success }
r.failure { render :failure }
end
card_saver.call(responder)
end
class Postman
include Interactor
def perform(context)
create_message_log.perform(context)
CreateMessageSummary.perform(context)
EnqueueMessageJob.perform(context)
class Postman
include Interactor
def perform(context)
if member.push_token_registered?
send_via_push
else
send_via_sms
%6:c*2284H2;^9L9^t6}2=)]g
class Secretary
include Interactor
def perform
SmsMessage.create!(message.attributes)
Postman.perform(message: message)
end
private