Skip to content

Instantly share code, notes, and snippets.

ActivityPub 是一种去中心化的内容聚合协议,可以让其他用户远程订阅你的内容。它很像升级版的 RSS,但是支持远程推送,因此订阅者可以及时获取你的内容,而不必时不时从客户端进行抓取。
下面是目前支持 ActivityPub 协议的开源软件,可以在自己的服务器架设服务。
- 微博(Twitter 的替代品):[Mastodon](https://mastodon.social/),[Pleroma](https://pleroma.social/)
- 照片分享(Instagram 的替代品):[Pixelfed](https://pixelfed.social/)
- 视频分享(Youtube 的替代品):[Peertube](https://joinpeertube.org/)
- 博客(Facebook 的替代品):[WriteFreely](https://writefreely.org/),[WordPress + ActivityPub 插件](https://wordpress.org/plugins/activitypub/),[Plume](https://joinplu.me/)
- 聊天(Slack 的替代品):[Mattermost](https://mattermost.com/),[Matrix](https://matrix.org/)
- 音乐分享(Spotify 的替代品):[Funkwhale](https://funkwhale.audio/)
@ruanyf
ruanyf / mtr.css
Created March 16, 2019 11:23
mtr.css: Hong Kong MTR station colors http://metrocolor.live/index.html
:root {
--heng-fa-chuen: #b51921;
--tai-koo: #b2103e;
--kowloon-bay: #c41832;
--tseung-kwan-o: #ef342a;
--wui-kai-sha: #a84d18;
--po-lam: #f68f26;
--sai-wan-ho: #faca07;
--disneyland-resort: #07594a;
--skek-kip-mei: #4ba946;
@ruanyf
ruanyf / favicon.template
Created February 19, 2018 12:32
favicon
<link rel=apple-touch-icon sizes=57x57 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-57x57.png>
<link rel=apple-touch-icon sizes=60x60 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-60x60.png>
<link rel=apple-touch-icon sizes=72x72 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-72x72.png>
<link rel=apple-touch-icon sizes=76x76 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-76x76.png>
<link rel=apple-touch-icon sizes=114x114 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-114x114.png>
<link rel=apple-touch-icon sizes=120x120 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-120x120.png>
<link rel=apple-touch-icon sizes=144x144 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-144x144.png>
<link rel=apple-touch-icon sizes=152x152 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-152x152.png>
<link rel=apple-touch-icon sizes=180x180 href=/icons-c63d5b9220d693d1053a43510ba1a15f/apple-touch-icon-180x180.p
@ruanyf
ruanyf / .xmobarrc
Created July 22, 2017 09:02
我现在使用的 .xmobarrc
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, additionalFonts = []
, borderColor = "black"
, border = TopB
, bgColor = "black"
, fgColor = "grey"
, position = Top
, textOffset = -1
, iconOffset = -1
, alpha = 255
@ruanyf
ruanyf / .xmobarrc
Created July 22, 2017 09:01
.xmobarrc 的最简单配置
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
, position = Top
, lowerOnStart = True
, commands = [ Run Weather "EGPN" ["-t","<station>: <tempC>C","-L","18","-H","25","--normal","green","--high","red","--low","lightblue"] 36000
, Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
@ruanyf
ruanyf / xmonad.hs
Created July 22, 2017 08:47
xmonad 配置文件范例
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
main = do
xmproc <- spawnPipe "xmobar"
@ruanyf
ruanyf / server.js
Created June 11, 2017 12:44
A server with LED on Raspberry Pi
var server = require('server');
var { get } = server.router;
var rpio = require('rpio');
rpio.open(11, rpio.OUTPUT);
function blink() {
rpio.write(11, rpio.HIGH);
setTimeout(function ledoff() {
@ruanyf
ruanyf / led-blink.js
Created June 11, 2017 12:33
Blinking LED on Raspberry Pi
@ruanyf
ruanyf / led-off.js
Created June 11, 2017 12:29
Close LED on Raspberry Pi
var rpio = require('rpio');
// Configure pin 11 (GPIO17) for output (i.e. read/write).
// rpio.setOutput(11);
rpio.open(11, rpio.OUTPUT);
// Turn GPIO17 on, also known as 'high'.
rpio.write(11, rpio.LOW);
@ruanyf
ruanyf / led-on.js
Created June 11, 2017 12:27
Open LED on Raspberry Pi
var rpio = require('rpio');
// Configure pin 11 (GPIO17) for output (i.e. read/write).
// rpio.setOutput(11);
rpio.open(11, rpio.OUTPUT);
// Turn GPIO17 on, also known as 'high'.
rpio.write(11, rpio.HIGH);