Skip to content

Instantly share code, notes, and snippets.

@kaz29
kaz29 / chatwork_to_slack.js
Last active December 12, 2016 04:29
Azure functions Chatwork to Slack
var request = require('request');
var Slack = require('slack-node');
module.exports = function (context, myTimer) {
var timeStamp = new Date().toISOString();
if(myTimer.isPastDue)
{
context.log('JavaScript is running late!');
}
@kaz29
kaz29 / docker-wordpress-mysql.json
Last active November 24, 2016 19:24
azure-quickstart-templates
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"newStorageAccountName": {
"type": "string",
"metadata": {
"description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
}
},
@kaz29
kaz29 / 101-function-app-create-dynamic.json
Last active November 24, 2016 08:17
azure-quickstart-templates
{
"$schema": "http://schemas.management.azure.com/schemas/2015-01-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appName": {
"type": "string",
"metadata": {
"description": "The name of the function app that you wish to create."
}
},
@kaz29
kaz29 / example.swift
Created August 26, 2016 00:49
Alamofire custom encode example
let url = "https://api.example.com/foo"
let paramaters = ["foo": "bar"]
let encoding = makeCustomEncoding()
Alamofire.request(.GET, url, parameters: parameters, encoding: encoding)
....
@kaz29
kaz29 / custom_encode.swift
Last active August 26, 2016 00:52
Alamofireのカスタムエンコード
func makeCustomEncoding() -> ParameterEncoding {
return ParameterEncoding.Custom { requestConvertible, parameters in
func escape(string: String) -> String {
// MEMO: /, ? もエンコードされるようにオリジナルのコードに追加指定している
// see https://github.com/Alamofire/Alamofire/blob/master/Source/ParameterEncoding.swift#L220
//
let generalDelimitersToEncode = ":#[]@/?" // does not include "?" or "/" due to RFC 3986 - Section 3.4
let subDelimitersToEncode = "!$&'()*+,;="
let allowedCharacterSet = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet
@kaz29
kaz29 / Article.php
Last active May 30, 2018 02:59
Swagger サンプル(example.sonはswagger-phpで生成したファイルです、swagger-uiに食わせるとAPIドキュメントがみられます。)
<?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* Article Entity.
*
* @SWG\Definition(
* definition="Article",
@kaz29
kaz29 / README.md
Last active August 29, 2015 14:22

CakePHPで学ぶ継続的インテグレーション ハンズオン@PHPカンファレンス福岡

CakePHPで学ぶ継続的インテグレーションhttp://www.amazon.co.jp/dp/4844336789/を題材に、継続的インテグレーションの概要〜環境構築方法の解説〜実際の開発の流れを解説します。

参加される方は、ハンズオン当日までに以下の事前準備をお願いします。

事前準備

ハンズオンの前に、以下の環境をご確認ください。ハンズオン会場にはネットワーク環境の提供はないので、当日ダウンロードなどは難しいです。

@kaz29
kaz29 / objc.md
Created April 3, 2015 06:47
社内向けiOSアプリ開発boot camp

社内向けiOSアプリ開発boot camp Objective-C編 目次

プログラムの基本的な概念を理解している人用です。変数とかループ、分岐みたいな解説は含みません。

カリキュラム

#1 開発環境の構築とHelloWorld

  • 開発環境の構築
    • Xcode
@kaz29
kaz29 / Vagrantfile
Created December 23, 2014 02:11
phpci_handson
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
@kaz29
kaz29 / コンテンツ整理
Last active August 29, 2015 14:06
CakePHPで学ぶ継続的インテグレーション ハンズオンツアー
# 概要
* トータル4時間。
* 完成形はgithubで公開
* 手順は[stypi_](https://code.stypi.com/kaz29/php_ci_book_handson/code)でリアルタイムに共有
* boxファイルはUSBで配布
* 事前にVagrant/VirtualBoxのインストールまではすませおいてもらう
* 念のためUSBには、Win/Macのインストーラを入れておく
# メニュー