Skip to content

Instantly share code, notes, and snippets.

View KEINOS's full-sized avatar

KEINOS KEINOS

View GitHub Profile
class MastodonSetUpGenerator < Rails::Generators::Base
desc "Set up Mastodon at once."
class_option :redis_host, type: :string, default: "localhost", desc: "Path for redis server"
class_option :redis_port, type: :numeric, default: 6379, desc: "Port for redis server"
class_option :redis_password, type: :string, default: "" , desc: "redis password"
class_option :redis_db, type: :numeric, default: 0, desc: "redis db path"
class_option :redis_url, type: :string, aliases: "-R", desc: "Set redis options like redis://password@host:port/path"
class_option :db_host, type: :string, default: "/var/run/postgresql", desc: "ip address or Unix domain socket path for PostgreSQL"
class_option :db_user, type: :string, default: "mastodon", desc: "PostgreSQL user"
@akihikodaki
akihikodaki / mastodon.te
Last active April 18, 2018 05:35
A SELinux policy module for Mastodon
policy_module(mastodon 1.1.2)
require {
attribute file_type;
attribute httpdcontent;
attribute port_type;
class dir {read search write};
class netlink_route_socket {bind create getattr nlmsg_read read write};
class process execmem;
@yume-yu
yume-yu / CardStyleView_inGoogleResult.user.js
Last active June 20, 2019 09:40
Card style View in Google result for Tampermonkey
// ==UserScript==
// @name Card style View in Google result
// @namespace https://twitter.com/yume_yu
// @homepage https://github.com/yume-yu/CardStyleView-in-GoogleResult
// @supportURL https://twitter.com/yume_yu
// @version 0.5
// @description This scripts add cardView to your GoogleSearchResult.
// @author @yume_yu
// @match https://www.google.com/search*
// @match https://www.google.co.jp/search*

プライバシーポリシー

個人情報保護基本方針

Increments株式会社(以下、「当社」といいます)は、当社がお預かりする様々な個人情報に対し、個人情報保護の社会的重要性を鑑み以下の方針に基づき個人情報の保護に努めます。

個人情報保護基本方針

  1. 当社は、個人情報を取得する際には、法令で例外として定められる場合を除き、利用目的を通知又は公表し、適法かつ公正な手段によって取得いたします。また、特定した利用目的の達成に必要な範囲を超えた、個人情報の目的外利用はいたしません。
@hidao80
hidao80 / mastogetter_url_shortener.gs
Created September 21, 2020 06:27
mastogetter用URL短縮Web API(Google Apps Script版)
//HTTP GETをハンドリングする
function doGet(e) {
//リクエストパラメータ名"q"の値を取得する
//あらかじめURLエンコードしたものを受け取ること!
const text = e.parameter.q;
console.log(text);
console.log(encodeURIComponent(text));
const payload = "url=" + encodeURIComponent(text);
const options = {
"method" : "post",
@woxtu
woxtu / background.js
Last active December 30, 2020 08:02
Qiitadon 新着 通知
const ws = new WebSocket("wss://streaming.qiitadon.com:4000/api/v1/streaming/?stream=public:local");
ws.addEventListener("message", (ev) => {
const { event, payload } = JSON.parse(ev.data);
if (event == "update") {
const status = JSON.parse(payload);
chrome.notifications.create(status.id, {
type: "basic",
iconUrl: status.account.avatar || status.account.avatar_static || "icon.png",
@okapies
okapies / mastodon-ostatus.md
Last active September 5, 2021 11:39
Mastodon OStatus API の叩き方

Mastodon が他のインスタンスと情報交換をする OStatus API の使い方。使ってるだけのユーザは知る必要がない裏側の話。

host-meta

Mastodon インスタンスに対して、RFC6415 が規定する /.well-known/host-meta というパスを要求すると以下の XML が返ってくる.

<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  <Link rel="lrdd" type="application/xrd+xml" template="https://[MASTODON_HOST]/.well-known/webfinger?resource={uri}"/>
</XRD>
@t-asa2000
t-asa2000 / twitter_customize.css
Last active November 28, 2021 07:28
自分仕様のTwitter(2020.7.23現在) #stylus #css
/*緑ベースのUIにする*/
svg.r-13gxpu9.r-4qtqp9.r-yyyyoo.r-16y2uox.r-1q142lx.r-8kz0gk.r-dnmrzs.r-bnwqim.r-1plcrui.r-lrvibr,.r-nw8l94 {
color: #00BC00;
}
.r-b5skir {
background-color: #00BC00;
}
/*サイドバーを非表示にする*/
@miguelmota
miguelmota / ipfs
Last active February 25, 2022 23:03
IPFS daemon run in background
ipfs daemon > ipfs.log &
@kaloprominat
kaloprominat / url: mac os online launchd plist generator
Created July 25, 2013 22:07
url: mac os online launchd plist generator
http://launched.zerowidth.com/