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 / square_twitter.user.js
Last active June 15, 2017 18:14
Twitterは四角っぽいほうが好き
// ==UserScript==
// @name we_love_square_twitter
// @namespace https://gist.github.com/mpyw/199917673d4eef200e0532af2aadda85
// @version 0.0.3
// @description ● → ■
// @author foooomio (より優れているので拝借させていただきました: http://qiita.com/foooomio/items/a8307820aabab37e02f2 )
// @match https://twitter.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 / gist:c0d8061c502b3eb9c52a8cc1e62e7764
Created March 20, 2017 06:49
サードのコンシューマキーでは使えないようです。Twitter for Android のキーを使用しました。 GET https://api.twitter.com/1.1/statuses/media_timeline.json
[{
"created_at": "Fri Feb 08 09:36:04 +0000 2013",
"id": 299813838403010560,
"id_str": "299813838403010560",
"text": "\u753b\u50cfpost\u3066\u3059\u3061 http:\/\/t.co\/49XVeerc",
"source": "\u003ca href=\"http:\/\/ksoft.dip.jp\/\" rel=\"nofollow\"\u003ere4k\u003c\/a\u003e",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
// https://api.twitter.com/1.1/search/universal.json?q=tweenq
{
"metadata": {
"cursor": "TWEET-170606166982930432-299822566774808577"
},
"modules": [
{
"status": {
"data": {
"contributors": null,
@mpyw
mpyw / otinpo.rb
Created March 20, 2017 06:48 — forked from rhenium/otinpo.rb
ウーン…もっと短くできると思うんだけど
r,s="おちんぽ","";s<<r[rand 4]until s.match r;puts s,"\nおぉぉお゙お゙~っ!!イグゥウ!!イッグゥウウ!!\n\n#{s.size}回目で果てました…"
Plugin.create(:inmuapi) do
[(1..4).to_a, "一二三四".chars].transpose.each do |num, knum|
command(:"inmuapi_#{num}", name: "真夏の夜の淫夢 #{knum}章", condition: -> _ { true }, visible: true, role: :postbox) do |opt|
res = Net::HTTP.get_response(URI.parse("http://api.yukkurisinai.net/inmu/story/#{num}"))
text = JSON.parse(res.body)["Plot"]
Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer.text = text
end
end
end
@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 / twcount.php
Last active October 21, 2016 10:58
最近のついったーはいじんどをしらべるよ
<?php
function prompt($msg, $hidden = false) {
echo $msg;
if ($hidden) {
`stty -echo`;
}
$r = trim(fgets(STDIN));
if ($hidden) {
`stty echo`;
@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 / horagai
Last active January 27, 2021 15:04 — forked from 844196/horagai
去ってください、そして、上手に言語を使用してください; I ngua.Useは言語です、そして、そして、見るために、それは激しく動きます; a.。シェルシェル
ぬあのようにあのようにア紫やおおお
chi枯れしぼむ・.・(小さな声)
MUR大変だった向こう脛ーこんにちは
重い。... これ ... ああ、とてもすでに今日、
それがそのようなキツいんすでも、私は好きでしょう、そして辞職するために既に来るために、なんで。何かがぶっとぅです。-
どのようにする起こるか〜ナ・トグや〜
彼は移動します -- それは迅速です...
ワイシャツすでに…ずぶぬれになります
洗面所のケースは、元気を回復します
2つのケース