Skip to content

Instantly share code, notes, and snippets.

@kaz29
kaz29 / example.php
Last active Apr 8, 2020
祭日取得
View example.php
<?php
use GuzzleHttp\Client;
function getHolidays($holidays_id, $start, $end, $api_key, $num = 50)
{
$url = "https://www.googleapis.com/calendar/v3/calendars/{$holidays_id}/events";
$query_string = "key={$api_key}&timeMin={$start}&timeMax={$end}&maxResults={$num}&orderBy=startTime&singleEvents=true";
$client = new Client();
$response = $client->request(
View README.md

docker-compose.yml

** --secure-file-priv='/tmp'** を付けないとcsvを吐き出せない

version: '3.4'

services:
  mysql-test:
    container_name: mysql-test
View composer.json
{
"name": "kaz/sastest",
"authors": [
{
"name": "Kaz Watanabe",
"email": ""
}
],
"require": {
"microsoft/azure-storage-blob": "^1.4",
View Dockerfile
FROM osrm/osrm-backend:v5.22.0
EXPOSE 5000
CMD ["osrm-routed", "--algorithm", "ch", "/srv/kanto-latest.osrm"]
@kaz29
kaz29 / Dockerfile
Created Jul 28, 2019
php-apache-5.2 with sqlite
View Dockerfile
FROM kaz29/centos5:latest
ENV PHP_VERSION 5.2.17
# Initial setup
RUN yum update -y
RUN yum groupinstall -y 'Development Tools'
# Apache installation
RUN yum install -y httpd httpd-devel
View Dockerfile
FROM php:7.1.17-cli-alpine3.7
RUN apk add --no-cache curl bash git tree \
&& { \
curl -sS https://getcomposer.org/installer; \
} | php \
&& mv composer.phar /usr/local/bin/composer \
&& echo "export PATH=~/.composer/vendor/bin:$PATH" >> /root/.bash_profile
RUN composer global require "symfony/console=v2.6.13" \
@kaz29
kaz29 / ansible.cfg
Created Mar 13, 2018
Ansible custom module for ansible
View ansible.cfg
[defaults]
transport=ssh
forks=10
library=./ansible/libs
[ssh_connection]
ssh_args=-o ControlMaster=auto -o ControlPersist=30m
scp_if_ssh=True
pipelining=True
View AreaComponent.js
import React from 'react'
import { Link } from 'react-router'
class AreaComponent extends React.Component {
constructor(props) {
super(props)
}
render() {
const { area } = this.props
@kaz29
kaz29 / phpinfo.txt
Created Jul 9, 2017
azure functions phpinfo
View phpinfo.txt
phpinfo()
PHP Version => 5.6.30
System => Windows NT RD00155E20242C 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586
Build Date => Jan 18 2017 19:41:45
Compiler => MSVC11 (Visual C++ 2012)
Architecture => x86
Configure Command => cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--with-oci8-12c=c:\php-sdk\oracle\x86\instantclient_12_1\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--without-analyzer" "--with-pgo"
Server API => Command Line Interface
Virtual Directory Support => disabled
@kaz29
kaz29 / chatwork_to_slack.js
Last active Dec 12, 2016
Azure functions Chatwork to Slack
View chatwork_to_slack.js
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!');
}
You can’t perform that action at this time.