Skip to content

Instantly share code, notes, and snippets.

View hisasann's full-sized avatar
🔖
I aspire to become a bookseller.

Yoshiyuki Hisamatsu hisasann

🔖
I aspire to become a bookseller.
View GitHub Profile
@hisasann
hisasann / 聖杯ダンジョンがだるい人たちに攻略まとめ【Bloodborne】.md
Last active September 23, 2020 08:11
聖杯ダンジョンがだるい人たちに攻略まとめ【Bloodborne】

聖杯だるい人たちにまとめ

【共通聖杯ダンジョンの概要】

※足りない素材は探索や一部の敵から集めること

①血の乾いた獣から「トゥメルの聖杯」を入手

②トゥメルの聖杯から「中央トゥメルの聖杯」を入手(以下全て最上層のボスを倒すと次の聖杯を入手できる)

(function(){
/*
* Reflector JavaScript Library version 1.0
* http://lab.hisasann.com/reflector/
*
* Copyright (c) 2009 hisasann http://hisasann.com/
* Dual licensed under the MIT and GPL licenses.
*/
var Reflector = function(){}
@hisasann
hisasann / electron-fullscreen-main.js
Created February 3, 2016 10:06
Windows でフルスクリーンする方法
app.on('ready', function() {
var Screen = require('screen');
var size = Screen.getPrimaryDisplay().size; // ディスプレイのサイズを取得する
// Create the browser window.
mainWindow = new BrowserWindow({
left: 0,
top: 0,
// この方法がいまのところ確実、これだと padding が発生しない
@hisasann
hisasann / site-url-for-markdown-bookmarklet.js
Created July 5, 2020 08:12
サイトのタイトルと URL をマークダウン用にコピペする用のブックマークレット
javascript:var ret=window.prompt('このページへのリンク','[' + document.title + '](' + location.href + ')');
@hisasann
hisasann / title-url-bookmarklet.js
Created July 5, 2020 08:10
サイトのタイトルと URL をコピペする用のブックマークレット
javascript:var ret=window.prompt('',document.title + ' - ' + location.href);
@hisasann
hisasann / GoogleFormからの内容をSlackに通知するGAS.js
Created May 25, 2020 06:20
GoogleFormからのSubmitをトリガーにしてSlackに通知するGoogleAppsScript
// Google Form が Submit されたときに呼ばれる
function onFormSubmit(e) {
Logger.log('フォームが送信されたぞ');
const itemResponses = e.response.getItemResponses();
itemResponses.forEach(function (itemResponse, index) {
Logger.log('質問' + index + ': ' + itemResponse.getItem().getTitle());
Logger.log('回答' + index + ': ' + itemResponse.getResponse());
});
@hisasann
hisasann / usr-local-bin-webstorm
Created May 5, 2020 07:53
webstorm コマンドを使えるようにする shell
#!/usr/bin/env python
# Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
# -*- coding: utf-8 -*-
import os
import socket
import struct
import sys
import traceback
@hisasann
hisasann / new Promise は非同期ではない.js
Created April 24, 2020 06:15
メモ:async await に引っ張られて Promise は非同期ぽさがあるが、非同期ではない。
console.log(1);
Promise.all([new Promise((resolve, reject) => {
console.log(3);
})]).then((values) => {
console.log(values);
});
console.log(2);
// 1
@hisasann
hisasann / jest-template-literal.js
Created April 13, 2020 01:34
describe.each でデータ行ごとに回す処理をテンプレートリテラルで書く方法
// https://jestjs.io/docs/en/api#describeeachtablename-fn-timeout
describe.each`
a | b | expected
${1} | ${1} | ${2}
${1} | ${2} | ${3}
${2} | ${1} | ${3}
`('$a + $b', ({a, b, expected}) => {
test(`returns ${expected}`, () => {
expect(a + b).toBe(expected);
});
@hisasann
hisasann / contentful-sample.js
Created February 17, 2020 16:43
contentful で getEntry する簡単なサンプル
const contentful = require("contentful");
const client = contentful.createClient({
// This is the space ID. A space is like a project folder in Contentful terms
space: "ra794i9t0yln",
// This is the access token for this space. Normally you get both ID and the token in the Contentful web app
accessToken: "U1Wffn5NIhptGsWKyliQCILCWpoaCjJK6mwJwYO_58g"
});
// This API call will request an entry with the specified ID from the space defined at the top, using a space-specific access token.
client.getEntries()
.then((response) => console.log(response.items))