Skip to content

Instantly share code, notes, and snippets.

View fujieda's full-sized avatar

Kazuhiro Fujieda fujieda

View GitHub Profile
@fujieda
fujieda / DenyRakutenNews.user.js
Created April 7, 2024 04:58 — forked from ktakayama/DenyRakutenNews.user.js
楽天のメルマガチェックを自動解除するGreaseonkeyスクリプト
// ==UserScript==
// @name Deny Rakuten News
// @namespace http://espion.just-size.jp/archives/05/136155838.html
// @description Deny Rakuten News
// @include https://*.step.rakuten.co.jp/*
// @include https://*.travel.rakuten.co.jp/rsv/RsvInput.do*
// @include https://my.rental.rakuten.co.jp/action/my/*
// @include https://delivery.rakuten.co.jp/*?module=Default&action=OrderStep*
// @include https://auction.item.rms.rakuten.co.jp/*
// @include https://my.checkout.rakuten.co.jp/myc/purchase/Confirm
@fujieda
fujieda / PreferEnglishOnMicrosoft.user.js
Last active April 7, 2024 04:57
Switches to en-US when loading Microsoft documents from another language
// ==UserScript==
// @name Prefer English on Microsoft
// @namespace https://gist.github.com/fujieda/bc86460d04c7256658c9fa2d99b55d2f/raw
// @description Switches to en-US when loading Microsoft documents from another language
// @include https://learn.microsoft.com/*
// ==/UserScript==
var pattern = /(.*microsoft.com)\/([a-z]{2}-[a-z]{2})\/(.*)/i;
var replacement = "$1/en-us/$3";
@fujieda
fujieda / MicrosoftEnDoc.User.js
Created October 13, 2021 11:49
Redirect ja-jp to en-us at docs.microsoft.com
// ==UserScript==
// @name Redirect ja-jp to en-us at docs.microsoft.com
// @namespace https://roundwide.com/
// @version 0.1
// @description Redirect ja-jp to en-us at docs.microsoft.com
// @author You
// @match https://docs.microsoft.com/ja-jp/*
// @match https://azure.microsoft.com/ja-jp/*
// @grant none
// ==/UserScript==
@fujieda
fujieda / YahooMailLineHeight.user.js
Last active March 29, 2021 08:50
Yahooメールのボディの行間を変えるTampermonkeyスクリプト
// ==UserScript==
// @name Yahoo Mail Line Hight
// @namespace https://roundwide.com/
// @version 0.1
// @description Set the line height of the e-mail body on Yahoo Mail.
// @author Kazuhiro Fujieda <fujieda@roundwide.com>
// @match https://*.mail.yahoo.co.jp/*
// @grant none
// ==/UserScript==
@fujieda
fujieda / PriorityQueue.cs
Created July 22, 2020 08:23
Priority Queue for C#
// Copyright (c) 2020 Kazuhiro Fujieda
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
// https://fujieda.mit-license.org/
static IEnumerable<IEnumerable<T>> Permutation<T>(T[] items)
{
return items.Length == 1
? new[] {items}
: items.SelectMany(item =>
Permutation(items.Where(x => !x.Equals(item)).ToArray())
.Select(perms => new[] {item}.Concat(perms)));
}
@fujieda
fujieda / PushBullet.cs
Created May 19, 2017 12:58
Push a note to all devices via PushBullet
using System.Net;
using System.Text;
namespace KancolleSniffer
{
public class PushBullet
{
public static void PushNote(string token, string title, string body)
{
using (var wc = new WebClient())
@fujieda
fujieda / gist:8c4e8e30861d4ae1df5a
Last active March 9, 2016 05:10
Status of Intel SSD 750 on ftp.jaist.ac.jp
[Controller]
PCI Vendor ID: 0x8086
PCI Subsystem Vendor ID: 0x8086
Model Number: INTEL SSDPEDMW012T4
Serial Number: CVCQ5466016U1P2BGN
Firmware Revision: 8EV10174
Recommended Arbitration Burst: 0
IEEE OUI Identifier: E4-D2-5C
Multi_interface Capabilities: 0
Maximum Data Transfer Size: 5
@fujieda
fujieda / arc_miss.txt
Created February 1, 2016 15:43
ARC misses by vnode operations on ftp.jaist.ac.jp
arc
bash, fop_lookup, 1
cron, fop_read, 1
dosync, fop_read, 1
ntpd, fop_write, 1
sshd, fop_getpage, 1
sshd, fop_read, 1
rsync, fop_create, 2
cron, fop_lookup, 3
ksh93, fop_lookup, 3
@fujieda
fujieda / ConfigFileSettingsProvider.cs
Created March 22, 2013 14:18
Formの設定プロパティを実行ファイルのあるディレクトリに"アプリケーション名.conf"で保存するための設定プロバイダー。 Settings.csでSettingsクラスに属性として[SettingsProvider(typeof(MyNamespace.ConfigSettingsProvider))]のように指定する。Settings.csはかなり見付けにくい。プロジェクトのプロパティから「設定」を選んで表示されるデザイナーからコードの表示を選ぶと開ける。 This program is licensed under the MIT License: http://fujieda.mit-license.org/2013
// Formの設定プロパティを実行ファイルのあるディレクトリに"アプリケーション名.conf"で保存するための設定プロバイダー。
// Settings.csでSettingsクラスに属性として[SettingsProvider(typeof(MyNamespace.ConfigSettingsProvider))]のように指定する。
// Settings.csはかなり見付けにくい。プロジェクトのプロパティから「設定」を選んで表示されるデザイナーからコードの表示を選ぶと開ける。
// This program is licensed under the MIT License:
// http://fujieda.mit-license.org/2013
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;