hipchat-notify用の設定。werckerのApplication Settings (右上の歯車アイコン) → Environment variables から、HIPCHAT_TOKENとHIPCHAT_ROOM_IDを追加する。
- HIPCHAT_TOKEN
- Text, Protected
- https://www.hipchat.com/account/api で作ったAPIトークンを設定
- Label: てきとう
| @IsTest | |
| private class CalloutSampleTest { | |
| public class CalloutMock implements HttpCalloutMock { | |
| public HttpResponse respond(HttpRequest req) { | |
| return new HttpResponse(); | |
| } | |
| } | |
| @IsTest |
| public class DateFormat { | |
| private static final Map<String, Integer> MONTHS = new Map<String, Integer> { | |
| 'Jan' => 1, 'Feb' => 2, 'Mar' => 3, 'Apr' => 4, 'May' => 5, 'Jun' => 6, | |
| 'Jul' => 7, 'Aug' => 8, 'Sep' => 9, 'Oct' => 10, 'Nov' => 11, 'Dec' => 12 | |
| }; | |
| public static Datetime fromRFC1123(String x) { | |
| String[] dateParts = x.split('[\\s:]'); | |
| Integer year = Integer.valueOf(dateParts[3]); |
| class Picture < ActiveRecord::Base | |
| belongs_to :imageable, polymorphic: true | |
| end | |
| class Product < ActiveRecord::Base | |
| end | |
| class PublicProduct < Product | |
| has_one :picture, as: :imageable | |
| end |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
| <!--Created by Ukelele version 2.2.8 on 2015-10-11 at 20:11 (JST)--> | |
| <!--Last edited by Ukelele version 2.2.8 on 2015-10-12 at 00:37 (JST)--> | |
| <keyboard group="0" id="11413" name="ABC (option keystrokes blank)" maxout="1"> | |
| <layouts> | |
| <layout first="0" last="17" modifiers="f4" mapSet="16c"/> | |
| <layout first="18" last="18" modifiers="f4" mapSet="984"/> | |
| <layout first="21" last="23" modifiers="f4" mapSet="984"/> | |
| <layout first="30" last="30" modifiers="f4" mapSet="984"/> |
| require 'json' | |
| require 'json/pure/generator' | |
| module JSON::Pure::Generator::GeneratorMethods | |
| %i(Fixnum Bignum).each do |constant| | |
| const_set constant, Integer | |
| end | |
| module Array | |
| alias_method :pure_to_json, :to_json |
| require 'json' | |
| require 'json/pure/generator' | |
| module Generator | |
| module GeneratorMethods | |
| (JSON::Pure::Generator::GeneratorMethods.constants - %i(Array Hash Integer)).each do |constant| | |
| const_set constant, JSON::Pure::Generator::GeneratorMethods.const_get(constant) | |
| end | |
| %i(Fixnum Bignum).each do |constant| |
| document.querySelector('#phHeaderLogoImage').src = 'http://pic.prepics-cdn.com/f2de00c74d43/17946611.jpeg' |
| <aura:component implements="force:appHostable" controller="myfirstltngController"> | |
| <aura:attribute name="account" type="Account"/> | |
| <aura:handler name="init" action="{!c.init}" value="{!this}"/> | |
| {!v.account.Name} | |
| <button onclick="{!c.save}">click</button> | |
| </aura:component> |
| function(i) { | |
| var fn = function(sum, e) { | |
| if (typeof e === typeof 0) return sum + e; | |
| if (e instanceof Array) return e.reduce(fn, sum); | |
| return sum; | |
| }; | |
| return i.reduce(fn, 0); | |
| }; |
hipchat-notify用の設定。werckerのApplication Settings (右上の歯車アイコン) → Environment variables から、HIPCHAT_TOKENとHIPCHAT_ROOM_IDを追加する。