Skip to content

Instantly share code, notes, and snippets.

@kiuyas
kiuyas / callback.php
Created January 8, 2017 05:19
LINEのBotに応答させるためのPHPスクリプト
<?php
$json_string = file_get_contents('php://input');
$jsonObj = json_decode($json_string);
$userId = $jsonObj->{"events"}[0]->{"source"}->{"userId"};
$replyToken = $jsonObj->{"events"}[0]->{"replyToken"};
$message = $jsonObj->{"events"}[0]->{"message"}->{"text"};
error_log("-------------------------------------------------- hello, this is a test!");
error_log(print_r($jsonObj, true));
error_log("userId: " . $userId);
@kiuyas
kiuyas / Form1.cs
Last active December 26, 2015 05:06
Win32APIによるウィンドウ操作用クラスと使用例(C#)
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace WindowCatcher
{
public partial class Form1 : Form
{
private List<IntPtr> windows;
@kiuyas
kiuyas / CaesarCipher.cs
Last active April 30, 2020 17:06
簡単なシーザー暗号化のプログラム(C#)
using System.Text;
namespace Encryptor
{
class CaesarCipher
{
private const int DEFAULT_DELTA = 2;
private int delta = 0;