Skip to content

Instantly share code, notes, and snippets.

View KEINOS's full-sized avatar

KEINOS KEINOS

View GitHub Profile
@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;
@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>
@rob-smallshire
rob-smallshire / macOS-in-virtualbox.md
Last active April 3, 2024 19:03
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

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"
@asukakenji
asukakenji / 0-go-os-arch.md
Last active April 24, 2024 06:51
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@miguelmota
miguelmota / ipfs
Last active February 25, 2022 23:03
IPFS daemon run in background
ipfs daemon > ipfs.log &
@alexedwards
alexedwards / main.go
Last active March 11, 2024 10:20
Password hashing and verification with Argon2id
package main
import (
"crypto/rand"
"crypto/subtle"
"encoding/base64"
"errors"
"fmt"
"log"
"strings"
@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. 当社は、個人情報を取得する際には、法令で例外として定められる場合を除き、利用目的を通知又は公表し、適法かつ公正な手段によって取得いたします。また、特定した利用目的の達成に必要な範囲を超えた、個人情報の目的外利用はいたしません。