Skip to content

Instantly share code, notes, and snippets.

View mokapyo's full-sized avatar

piyorz mokapyo

View GitHub Profile
/**
* MemoSendLINE
* GoogleHomeからお買い物メモをLINEで通知する
*/
function doGet(e) {
// Googleスプレッドシートから買い物メモを取得
var ss = SpreadsheetApp.openById("<スプレッドシートのID>");
var sheet = ss.getSheetByName("shopping");
var msg = "\n*****[お買い物メモ]******\n";
@mokapyo
mokapyo / stalkingwife.js
Created March 11, 2018 13:10
GoogleHome用旦那監視アプリ
var googlehome = require('google-home-notifier');
var twitter = require('twitter');
var language = 'ja';
// 取得したTwitter API用の設定---
var client = new twitter({
consumer_key: 'piyo',
consumer_secret: 'piyopiyo',
access_token_key: 'piyopiyopiyo',
access_token_secret: 'piyopiyopiyopiyo',
#include <Windows.h>
#include <Ole2.h>
#include <stdio.h>
#include "CExcelEdit.h"
int main(int argc, char* argv[]) {
// ファイルのオープン
CString FilePath = _T("C:\\test\\a.xlsx");
#include <Ole2.h>
#include <atlstr.h>
#include "CExcelEdit.h"
class CExcelEdit {
public:
CExcelEdit(CString FilePath, CString SheetName);
~CExcelEdit();
#include <windows.h>
#include <winhttp.h>
#include <atlstr.h>
#pragma comment (lib, "winhttp.lib")
int main() {
HINTERNET hSession, hConnect, hRequest;
URL_COMPONENTS urlComponents;
WCHAR szHostName[256], szUrlPath[2048];
// TestRMSDlg.cpp : 実装ファイル
//
#include "stdafx.h"
#include "TestRMS.h"
#include "TestRMSDlg.h"
#include "SelectDlg.h"
#include "afxdialogex.h"
#include <msipc.h>
#!/bin/sh
### define parameter
CAname="piyoCA"
SelfSignedCert="CAcert.pem"
SelfSignedKey="CAkey.pem"
PassPhrase="piyoca"
###
# make CA dir
#!/bin/sh
#apt-get -y install expect
### define parameter
dirname=/etc/ssl/www.piyoweb.com
keyname=web.key
keypass=piyoweb
cername=web.csr
IPaddr=192.168.1.7
###
TCHAR buf[MAX_LINE];
FILE *fp;
_tfopen_s(&fp, _T("test.reg"), _T("r"));
while (_fgetts(buf, MAX_LINE, fp) != NULL) {
TCHAR *p = _tcsstr(buf, _T("{"));
if (p != NULL) {
CString Guid = p;
TCHAR buf[MAX_LINE];
FILE *fp;
_tfopen_s(&fp, _T("test.reg"), _T("r"));
// Add processing -----------------
if(_fgettc(fp) == 0xff && _fgettc(fp) == 0xfe){
fclose(fp);
_tfopen_s(&fp, _T("test.reg"), _T("br"));