Skip to content

Instantly share code, notes, and snippets.

@stachibana
stachibana / blueprint.json
Created December 18, 2023 06:01
生成AIカルタのblueprint
{
"name": "LINE+OpenAI",
"flow": [
{
"id": 1,
"module": "line:watchMessages",
"version": 1,
"parameters": {
"__IMTHOOK__": 1021861
},
@stachibana
stachibana / README.md
Last active May 19, 2020 01:54
Ruby on Rails 2.7.1 + ngrok on Cloud9
@stachibana
stachibana / sample.py
Created August 14, 2018 11:58
Python example of LINE Pay API
import os
from flask import Flask, request, abort, render_template, redirect
import requests
from flask_bootstrap import Bootstrap
app = Flask(__name__, static_folder='static')
bootstrap = Bootstrap(app)
import json
import shelve
@stachibana
stachibana / kopipe.md
Last active September 11, 2018 11:33
CEKハンズオン用のテキストです。PDFからうまくコピペ出来ない場合にお使いください。
$response = $bot->getMessageContent($event->getMessageId());
$rawBody = $response->getRawBody();
.
.
.
function uploadImageToCloudinaryThenGetResult($rawBody) {
\Cloudinary::config(array(
<?php
require_once __DIR__ . '/vendor/autoload.php';
define('TABLE_NAME_USERS', 'users');
$httpClient = new \LINE\LINEBot\HTTPClient\CurlHTTPClient(getenv('CHANNEL_ACCESS_TOKEN'));
$bot = new \LINE\LINEBot($httpClient, ['channelSecret' => getenv('CHANNEL_SECRET')]);
$signature = $_SERVER["HTTP_" . \LINE\LINEBot\Constant\HTTPHeader::LINE_SIGNATURE];