Skip to content

Instantly share code, notes, and snippets.

View KEINOS's full-sized avatar

KEINOS KEINOS

View GitHub Profile
@KEINOS
KEINOS / mastodon-installer-for-CentOS7x-at-SakuraVPS.sh
Last active January 12, 2023 17:28
さくらのVPS+CentOS7でMastodonをインストールするシェルスクリプト。One-liner Mastodon Instance installer for CentOS7.2 on SakuraVPS.
#!/bin/bash
echo ""
echo "-----------------------------"
echo " ╔╦╗╔═╗╔═╗╔╦╗╔═╗╔╦╗╔═╗╔╗╔"
echo " ║║║╠═╣╚═╗ ║ ║ ║ ║║║ ║║║║"
echo " ╩ ╩╩ ╩╚═╝ ╩ ╚═╝═╩╝╚═╝╝╚╝"
echo " Mastodon Installer for"
echo " CentOS 7.x at Sakura VPS"
echo ""
echo ""
@KEINOS
KEINOS / playbook.yml
Last active December 8, 2022 10:13
Sample Playbook
- name: Update and upgrade apt packages
hosts: rpi
user: pi
# Become sudoer
become: yes
tasks:
- name: apt update
apt:
# apt update
update_cache: yes
@KEINOS
KEINOS / docker-compose.yml
Created December 8, 2022 09:22
[Ansible Semaphore] docker-compose.yml for Ansible over Semaphore
services:
semaphore:
restart: unless-stopped
ports:
- 3000:3000
image: semaphoreui/semaphore:latest
environment:
SEMAPHORE_DB_DIALECT: bolt
SEMAPHORE_ADMIN_PASSWORD: <your admin password>
SEMAPHORE_ADMIN_NAME: <your admin display name>
@KEINOS
KEINOS / Playlist.md
Last active November 18, 2022 05:16
KEINOS - Youtube Playlist
@KEINOS
KEINOS / install_ruby_rpi.sh
Last active November 5, 2022 18:07 — forked from zzidante/install_ruby_rpi.sh
A Bash script to install Ruby 2.6.8 on the Raspberry Pi OS
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.6.8 using rbenv/ruby-build on the Raspberry Pi OS
#
# Run from the web:
# bash <(curl -sL https://gist.github.com/KEINOS/7101f542be23e5048198e2a27c3cfda8/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Welcome message
@KEINOS
KEINOS / ipfs-cluster.service
Last active October 29, 2022 00:51
[IPFS] Simple "systemd" example to run IPFS and IPFS-Cluster as a service.
[Unit]
Description=IPFS-Cluster daemon
After=network.target ipfs
[Service]
User=myuser
WorkingDirectory=/home/myuser/
ExecStart=/usr/local/bin/ipfs-cluster-service daemon --bootstrap /ip4/<IP of your bootstrap>/tcp/9096/p2p/<NodeID>
Restart=on-failure
[Install]
WantedBy=multi-user.target
@KEINOS
KEINOS / README.md
Last active October 27, 2022 23:32
[IPFS] Installing IPFS (Kubo/go-ipfs) on Alpine Linux (not on Docker container)

Follow the steps in this document if you get "No such file or directory" or "not found" error by downloding from the pre-compiled official releses.

Install IPFS (Kubo) on Alpine Linux (NOT on Docker)

This document describes how to install and update IPFS (Kubo, fka go-ipfs) on Alpine Linux and not on Docker container image.

We have found that it is more stable to build from source and update with the gup command.

  • Tested on: Alpine 3.16
@KEINOS
KEINOS / docker-compose.yml
Last active October 27, 2022 01:21
[IPFS] Example of Docker compose file for Kubo IPFS. Replace "</absolute/path/...>" to your local path.
version: "3.9"
services:
ipfs:
container_name: ipfs
image: ipfs/kubo:latest
volumes:
# Staging data
- </absolute/path/to/somewhere/>:/export
# IPFS data
- </absolute/path/to/somewhere_else/>:/data/ipfs
@KEINOS
KEINOS / how_to_create_a_cluster_secret.md
Created October 26, 2022 14:07
[IPFS] How to create a cluster secret.

How to create/generate a cluster secret of IPFS cluster

The cluster secret must be exactly 64 characters and contain only hexadecimal characters ([0-9a-f]). (from "cluster_config.go" | ipfs-cluster @ GitHub)

So, we just need to generate a 64 character in hex.

$ od -vN 32 -An -tx1 /dev/urandom | tr -d ' \n'
@KEINOS
KEINOS / Qiita スパム記事パターン.md
Last active October 24, 2022 03:14
Qiita スパム記事パターン

Qiita スパム記事パターン

以下のチェック事項をフラグとして、フラグの組み合わせでスパム検知するためのメモです。

Note true(yes) の場合がスパムに含まれたフラグとします。

記事内文字列・チェック

  • すべて半角英数字記号である