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
type A = {
id: string
}
type B = {
age: number;
gender: 0 | 1| 2;
}
type C = A & B
type Flatten<T> = {
@hisasann
hisasann / gist:4037805
Created November 8, 2012 09:40
AndroidでWebViewのCookieを共有する方法
package com.hisasann.sample_cookieshare;
import java.io.IOException;
import java.util.List;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.CookieStore;
import org.apache.http.client.ResponseHandler;
@hisasann
hisasann / amazonホームだけ検索窓に勝手にフォーカスするスクリプト.js
Created June 29, 2023 09:18
amazonホームだけ検索窓に勝手にフォーカスするスクリプト
// ==UserScript==
// @name amazonホームだけ検索窓に勝手にフォーカスするスクリプト
// @namespace http://hisasann.dev/
// @version 0.1
// @description nameのまま
// @author hisasann
// @match https://www.amazon.co.jp/
// @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.co.jp
// @grant none
// ==/UserScript==
@hisasann
hisasann / 1on1-template.md
Last active August 1, 2022 02:45
1on1の1回分の雛形です
Markdown として使う場合は以下のままお使いください。
Google Docs などで使う場合は、日付の部分を「見出し2」として使うとキレイに使えます。

各項目は、箇条書きで書いていきましょう。

エンジニア目標は、3ヶ月以内で達成できるボリュームで1〜3個ほど書いてみましょう。
難易度にもよるので、1個でも全然問題ありません。
やっていき!
@hisasann
hisasann / BrightnessController.cs
Created July 31, 2017 08:54
windows上で輝度を変更するコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Management;
namespace DeviceManager.Brightness
{
class BrightnessController
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
canvas {
width: 500px;
height: 500px;
}
@hisasann
hisasann / webpack5.config.js
Last active November 19, 2021 08:20
webpack v5系 のCSS・JavaScriptの画像パスを解決してくれるサンプル
const webpack = require('webpack')
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
const path = require('path')
const environment = process.env.NODE_ENV || 'development'
process.noDeprecation = true
// 共通の設定
let config = {
@hisasann
hisasann / webpack2.config.js
Last active November 19, 2021 08:20
webpack v2系 のCSS・JavaScriptの画像パスを解決してくれるサンプル
let config = {
mode: environment,
entry: {
main: ['./src/index.jsx'],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'public'),
},
resolve: {
@hisasann
hisasann / old-webstorm-command-line.python
Created November 24, 2020 11:31
WebStorm2019までのwebstormコマンドの中身、2020からはめちゃくちゃシンプルになった
#!/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 / 別のdocsから議事録や日報をコピーするGAS.js
Last active October 20, 2020 09:39
Google Document でテンプレートとなる docs からひな形をコピーする Google Apps Script
// Google Apps Scriptで議事録テンプレ作成を楽にした - Qiita - https://qiita.com/wiroha/items/5ce99d7bfc56e3270be6
function onOpen() {
// Google Apps Scriptを使った独自メニューの作り方 - Qiita - https://qiita.com/howdy39/items/46ca1f2fd9d27eaba0c3
const ui = DocumentApp.getUi(); // Uiクラスを取得する
const menu = ui.createMenu('日報'); // Uiクラスからメニューを作成する
menu.addItem('1日分を新たに作成', 'insertTemplate'); // メニューにアイテムを追加する
menu.addToUi(); // メニューをUiクラスに追加する
}