Skip to content

Instantly share code, notes, and snippets.

View mokamoto's full-sized avatar

Mitch Okamoto mokamoto

View GitHub Profile
@mokamoto
mokamoto / sql
Created September 21, 2018 03:50
MuleSoftハンズオン - SQL
SELECT product.*, CONCAT('["', (GROUP_CONCAT(variant.picture SEPARATOR '", "')),'"]') AS pictures, CONCAT('[', GROUP_CONCAT('{"',variant.identifierType, '":"', variant.identifier, '"}'),']') AS identifiers FROM product INNER JOIN variant ON product.uuid = variant.productUUID WHERE product.uuid = :id;
@mokamoto
mokamoto / Dataweave
Created September 21, 2018 03:49
MuleSoftハンズオン - Dataweaveスクリプト
%dw 2.0 // The version
output application/json // The mime-type of the output
var product = payload[0] // Setting a variable called product with a value of the first item of query's payload
---
{
identifier: product.uuid,
identifiers: read(product.identifiers default "[]","application/json"), // Parsing this string to a JSON object. If null, defaults to empty array to avoid a null exception.
price: {
amount: {
currencyValue: product.currencyValue,
@mokamoto
mokamoto / products.raml
Created September 21, 2018 03:39
MuleSoftハンズオン - RAML定義
#%RAML 1.0
title: DevRel-Quick Start Products API
version: v1.0
##securitySchemes:
## basic:
## description: |
## This API supports Basic Authentication.
## type: Basic Authentication
@mokamoto
mokamoto / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@mokamoto
mokamoto / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../google-map/google-map-search.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@mokamoto
mokamoto / designer.html
Created October 30, 2014 13:25
designer
<link rel="import" href="../yt-video/yt-search-video.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
<apex:page showHeader="false" standardController="Account" standardStylesheets="false" docType="html-5.0" applyHtmlTag="false" applyBodyTag="false">
<html>
<head>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key=AIzaSyCDnW4hjusPT-WyjMluh1FxUJfN2QefNp8&sensor=false"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var myOptions = {
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP,
<apex:page standardController="Case" recordSetvar="cases">
<apex:pageBlock >
<apex:form id="theForm">
<apex:panelGrid columns="2">
<apex:outputLabel value="View:"/>
<apex:selectList value="{!filterId}" size="1">
<apex:actionSupport event="onchange" rerender="list"/>
<apex:selectOptions value="{!listviewoptions}"/>
</apex:selectList>
</apex:panelGrid>
<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="保存" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}" var="opp">
<apex:column value="{!opp.name}"/>
<apex:column headerValue="フェーズ">
public class Governor1{
private static final integer ONE = 1;
private static final String ONE_MESSAGE = 'ええぃ!セールスフォースのガバナは化け物か!';
private Governor1(){}
public static void check(){
Governor1.check(false);
}