Skip to content

Instantly share code, notes, and snippets.

View mpyw's full-sized avatar
🏠
Working from home

mpyw mpyw

🏠
Working from home
View GitHub Profile
@mpyw
mpyw / free_email_provider_domains.txt
Last active May 7, 2024 10:26 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. All forks from the original gist are merged. The list only contains valid hostnames.
0039.cf
0039.ga
0039.ml
00b2bcr51qv59xst2.cf
00b2bcr51qv59xst2.ga
00b2bcr51qv59xst2.ml
02466.cf
02466.ga
02466.ml
07819.cf
@mpyw
mpyw / Logger.js
Created August 14, 2018 17:46
Send your browser console errors to AWS CloudWatch. Inspired by https://github.com/agea/console-cloud-watch
import React, { Component } from 'react'
import CloudWatchLogs from 'aws-sdk/clients/cloudwatchlogs'
import Fingerprint2 from 'fingerprintjs2'
import StackTrace from 'stacktrace-js'
import { promisify } from 'es6-promisify'
export default class Logger {
events = []
originalConsole = null
@mpyw
mpyw / array_splice_assoc.php
Last active January 6, 2022 02:16
array_splice_assoc.php
<?php
// https://stackoverflow.com/questions/16585502/array-splice-preserving-keys/70576992#70576992
function array_splice_assoc(array &$input, int|string $offset, ?int $length = null, $replacement = []): array
{
// Normalize offset
$offset = match (true) {
is_string($offset) => array_flip(array_keys($input))[$offset] ?? throw new OutOfBoundsException(),
$offset < 0 => count($input) + $offset,
@mpyw
mpyw / force_use_latest_tweets.user.js
Last active March 5, 2021 08:06
新 Twitter で「最新のツイート」に強制的に切り替えるやつ
// ==UserScript==
// @name 新 Twitter で「最新のツイート」に強制的に切り替えるやつ
// @namespace https://twitter.com/mpyw
// @version 0.1
// @description お節介機能を殺す
// @author mpyw
// @match https://twitter.com/home
// @grant none
// ==/UserScript==
@mpyw
mpyw / horagai
Last active January 27, 2021 15:04 — forked from 844196/horagai
去ってください、そして、上手に言語を使用してください; I ngua.Useは言語です、そして、そして、見るために、それは激しく動きます; a.。シェルシェル
ぬあのようにあのようにア紫やおおお
chi枯れしぼむ・.・(小さな声)
MUR大変だった向こう脛ーこんにちは
重い。... これ ... ああ、とてもすでに今日、
それがそのようなキツいんすでも、私は好きでしょう、そして辞職するために既に来るために、なんで。何かがぶっとぅです。-
どのようにする起こるか〜ナ・トグや〜
彼は移動します -- それは迅速です...
ワイシャツすでに…ずぶぬれになります
洗面所のケースは、元気を回復します
2つのケース
@mpyw
mpyw / gist:4f18cff116843eef5634
Last active October 4, 2020 20:39 — forked from cucmberium/gist:e687e88565b6a9ca7039
Twitterの検索API

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@mpyw
mpyw / qiita_nonsense_lgtm_button_killer.user.js
Last active March 13, 2020 19:54
qiita_nonsense_lgtm_button_killer.user.js
// ==UserScript==
// @name Qiita Nonsense LGTM Button Killer
// @namespace https://github.com/mpyw
// @version 0.6
// @description Qiita の LGTM を倒す
// @author mpyw
// @match https://qiita.com/*
// @grant none
// ==/UserScript==
@mpyw
mpyw / git-big-objects.sh
Created April 30, 2017 19:02 — forked from msohn/git-big-objects.sh
Script to show n largest objects in a git repo's pack files.
#!/bin/bash
# -----------------------------------------------------------------------
# Copyright (C) 2013 Matthias Sohn <matthias.sohn@sap.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@mpyw
mpyw / API-official-memo.md
Created July 25, 2016 13:58
Twitterのアンケート関連のAPIのサンプル

アンケートAPIのメモ

全部PHPで書いているので他の言語を使うときは読み替えて下さい。Twitter APIのライブラリはTwistOAuthを使っています。
ここで説明するのは公式のAPIからの取得のみです。作成はここからでは出来ません。出来るのは取得のみです。

ログイン

公式のキーでログインする必要があります。サードパーティではアンケートの情報が一切入らないためです。

// Twitter for Macのキーでログイン
@mpyw
mpyw / qiita-trend-eliminator.user.js
Last active November 12, 2018 10:50
Qiita Trend Eliminator
// ==UserScript==
// @name Qiita Trend Eliminator
// @namespace http://tampermonkey.net/
// @version 0.2
// @description https://qiita.com/ を https://qiita.com/tag-feed にいい感じに置き換える
// @author mpyw
// @match https://qiita.com/*
// @grant none
// ==/UserScript==