Skip to content

Instantly share code, notes, and snippets.

View goofmint's full-sized avatar

Atsushi goofmint

View GitHub Profile
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.hexabase=t():e.hexabase=t()}(self,(()=>(()=>{var e={5092:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AbortError:()=>n,DefaultHttpClient:()=>C,HttpClient:()=>h,HttpError:()=>s,HttpResponse:()=>l,HttpTransportType:()=>K,HubConnection:()=>$,HubConnectionBuilder:()=>Z,HubConnectionState:()=>N,JsonHubProtocol:()=>z,LogLevel:()=>p,MessageType:()=>j,NullLogger:()=>_,Subject:()=>L,TimeoutError:()=>r,TransferFormat:()=>G,VERSION:()=>f});class s extends Error{constructor(e,t){const i=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=i}}class r extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class n extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class o extends Error{constructor(e,t){const i=new.target.protot
@goofmint
goofmint / index.js
Created August 30, 2023 02:00
Render updated pages in wiki.js
<script src="//cdnjs.cloudflare.com/ajax/libs/timeago.js/4.0.0-beta.2/timeago.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/timeago.js/4.0.0-beta.2/timeago.locales.min.js"></script>
<script>
const token = 'YOUR_WIKIJS_TOKEN';
const locale = 'ja';
const pageTag = 'service';
const limit = 10;
const DOMContentLoaded = () => {
renderNewPage();
alert(true);
@goofmint
goofmint / cmc.sh
Last active November 25, 2020 05:03
コマンドラインでCustomers Mail Cloudからメール送信を行うシェルスクリプト
#!/bin/bash -x
PROGNAME=$(basename $0)
VERSION='2.0'
declare -a FILES=()
usage() {
echo "Usage: $PROGNAME [OPTIONS]"
echo " This script is sending email from shell script by Customers Mail Cloud."
@goofmint
goofmint / notableToBoostnote.js
Created August 14, 2020 09:47
Move contents from Notable to Boostnote
const fs = require('fs');
const { promisify } = require('util');
const metadataParser = require('markdown-yaml-metadata-parser');
const baseDir = '/path/to/Notable/notes';
const outputDir = '/path/to/Boostnote';
(async () => {
const files = await promisify(fs.readdir)(baseDir);
const fileList = files.filter((file) => /.*\.md$/.test(file) && fs.statSync(`${baseDir}/${file}`).isFile());
const a_class = ncmb.DataStore('A_class');
const b_class = ncmb.DataStore('B_class');
// ↓ ここ
ons.ready(async function() {
const result = await a_class.fetchAll();
for (let row of result) {
const result2 = await b_class
.relatedTo(row, 'tests')
.fetchAll();
objectB.push(result2.count);
@goofmint
goofmint / code.js
Created March 10, 2020 04:11
QualityForwardとGoogleスプレッドシートでテスト結果を可視化するサンプルコード
function myFunction() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data")
var apiKey = sheet.getRange(1, 2).getValue();
var qf = new QualityForward.Client(apiKey);
var resultSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("TestResult")
var today = new Date;
var testPhaseId = sheet.getRange(2, 2).getValue();;
var testSuiteAssignmentId = sheet.getRange(3, 2).getValue();;
var testCycleId = sheet.getRange(4, 2).getValue();;
async function select(category) {
myNavigator.pushPage('display.html');  //画面遷移
var LaundryData = ncmb.DataStore("LaundryData");
var currentUser = ncmb.User.getCurrentUser();
try {
// awaitに変更
var results = await LaundryData.equalTo("owner", currentUser.get("userName"))  //現在ログインしているユーザ、あてはまるカテゴリで検索
.equalTo("categoryData", category)
.order("laundryName")
.fetchAll();
({}).constructor.name
// -> "Object"
(function hello() {}).constructor.name
// -> "Function"