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-centos7.x-at-SakuraCloud.sh
Last active July 3, 2017 10:48
Mastodonインスタンスのスタートアップ・スクリプト [Detail: https://cloud-news.sakura.ad.jp/startup-script/mastodon/information/ ][2017/06/17現在][さくらインターネット][さくらのクラウド][CentOS7.3]
#!/bin/bash
#
# @sacloud-once
# @sacloud-desc-begin
# このスクリプトはmastodonをセットアップします。
# (このスクリプトは、CentOS7.Xでのみ動作します。)
#
# 事前作業として以下の2つが必要となります
# ・さくらのクラウドDNSにゾーン登録を完了していること
# ・さくらのクラウドAPIのアクセストークンを取得していること
@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 / mastodon-installer-for-CentOS7x-with-KUSANAGI-at-SakuraVPS.sh
Last active March 6, 2023 05:27
さくらのVPS+KUSANAGI+CentOS7でMastodonをインストールするシェルスクリプト。One-liner Mastodon Instance installer for CentOS7.2 with KUSANAGI on SakuraVPS.
#!/bin/bash
echo
echo "-----------------------------"
echo " ╔╦╗╔═╗╔═╗╔╦╗╔═╗╔╦╗╔═╗╔╗╔"
echo " ║║║╠═╣╚═╗ ║ ║ ║ ║║║ ║║║║"
echo " ╩ ╩╩ ╩╚═╝ ╩ ╚═╝═╩╝╚═╝╝╚╝"
echo " Installer for Sakura VPS"
echo " (CentOS7x with KUSANAGI)"
echo "-----------------------------"
echo
@KEINOS
KEINOS / RictyDiminishedDiscord-Regular.css
Last active June 25, 2017 10:07
Sample CSS to use "Ricty Diminished" fonts installed in your Mac OSX.
<style type="text/css">
.debug {
width:100%;
font-size:16px;
/* See the PostScriptName of the font info at FontBook app */
font-family:"RictyDiminishedDiscord-Regular";
overflow: auto;
white-space: pre-wrap;
word-wrap: break-word;
}
@KEINOS
KEINOS / mondorescue-installer-for-CentOS7x-at-SakuraVPS.sh
Last active July 27, 2019 03:57
Mondo Rescue Installer for CentOS7 at Sakura VPS.
#!/bin/bash
# HOW TO INSTALL
# Run below as root
# cd ~/ && wget -O install_mondorescue.sh https://gist.github.com/KEINOS/a71475750b644b1c26db42870cfbafe5/raw&&chmod 0755 install_mondorescue.sh && ./install_mondorescue.sh
# ---------------------------------
# Set screen width
# ---------------------------------
if [ -n "${TERM}" ]; then width=$(tput cols); else width=20; fi
@KEINOS
KEINOS / 20170718-1-error-full.log
Last active July 18, 2017 08:05
[ERROR LOG] While installing Mondo Rescue on Vanilla CentOS Linux release 7.3.1611 (Core)
[root@ixx-xxx-xxxxx ~]# cd ~/
[root@ixx-xxx-xxxxx ~]#
[root@ixx-xxx-xxxxx ~]# # Update yum skip to line 2838
[root@ixx-xxx-xxxxx ~]# yum -y update
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 5.0 kB 00:00:00
epel | 4.3 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
@KEINOS
KEINOS / 1-sample.php
Last active January 21, 2020 00:49
UTF-8文字コードを利用したN進数変換関数。MD5ハッシュを10桁の文字列に圧縮できます。詳細 https://blog.keinos.com/20170720_2810
<?php
// Include user function
include('2-mb_base_encode.php');
// Input string
$s = 'This is a sample string to be hashed.';
// Calculate samples
$result1 = $s;
$result2 = md5($s);
@KEINOS
KEINOS / 20170728-error-1.log
Created July 24, 2017 11:03
[ERROR LOG] While installing `ripgrep` on RaspberryPi(Raspbian, Jessie)
pi@RPi-KEINOS:~ $ sudo apt-get install software-properties-common
pi@RPi-KEINOS:~ $
pi@RPi-KEINOS:~ $ sudo add-apt-repository ppa:x4121/ripgrep
You are about to add the following PPA to your system:
PPA to provide Ripgrep for Ubuntu.
This PPA will only contain Ripgrep and its dependencies (if required).
Upstream: https://github.com/BurntSushi/ripgrep
More info: https://launchpad.net/~x4121/+archive/ubuntu/ripgrep
@KEINOS
KEINOS / Main.php
Last active February 10, 2020 03:42
Wiqiitaブックマークレット・ジェネレーター:Qiita上で単語を選択、もしくはQiitaタグ選択時の一覧画面でブックマークを選ぶとWikipediaの検索結果が表示されるブックマークレット用Javascriptを出力するPHPです。
<?php
////////////////////////////////////////////////////////////////////
// Qiitaページの拡張ブックマークレット・ジェネレーター
//
// Qiitaページ内の選択用語、もしくはQiitaタグ選択時の一覧のタグ用語
// をWikipediaAPI(SimpleAPI経由)で検索して、結果を表示するだけのブッ
// クマークレットです。
//
// 使い方:
// 1) Chromeで適当なページをブックマークする。
@KEINOS
KEINOS / Main.php
Last active December 10, 2019 14:33
A bookmarklet generator for Mastodon that helps toot a visiting web page's URL and the title. No OAuth login required.
<?php
//header("Content-type: text/text; charset=utf-8");
///////////////////////////////////////////////////////////////////////////////
// Qiitadon 用引用トゥートのブックマークレット・ジェネレーター
///////////////////////////////////////////////////////////////////////////////
$your_instance = 'qiitadon.com';
$your_language = 'ja'; // "ja" or "en"
$enable_linebreak = 'true'; // 固定長の設定。false = 引用時に固定長で改行しない。
$width_linebreak = 12*2; // 固定長幅。引用時の1行の文字幅。全角文字数*2