Skip to content

Instantly share code, notes, and snippets.

Avatar
🎈
🎈😍

BALLOON | FU-SEN fu-sen

🎈
🎈😍
View GitHub Profile
@fu-sen
fu-sen / note-on-misskey-widget-button.aiscript
Created February 11, 2023 08:58
Misskey: Button to post a fixed note on Misskey widget Button | Misskey ウィジェット ボタン 固定ノート(投稿)ボタン
View note-on-misskey-widget-button.aiscript
// CC0 1.0 https://creativecommons.org/publicdomain/zero/1.0/deed
let data = {
text: "test"
visibility: "public"
}
Mk:api("notes/create" data)
@fu-sen
fu-sen / note-on-misskey-widget-aiscript-app.aiscript
Last active February 11, 2023 09:01
Misskey: Button to post a fixed note on Misskey widget AiScript App | Misskey ウィジェット AiScript App 固定ノート(投稿)ボタン
View note-on-misskey-widget-aiscript-app.aiscript
// CC0 1.0 https://creativecommons.org/publicdomain/zero/1.0/deed
let button = `button name`
let result = `test`
Ui:render([
Ui:C:container({
children: [
Ui:C:postFormButton({
text: button
@fu-sen
fu-sen / note-on-misskey-play.aiscript
Last active February 11, 2023 08:52
Misskey: Button to post a fixed note on Misskey Play | Misskey Play 固定ノート(投稿)ボタン
View note-on-misskey-play.aiscript
// CC0 1.0 https://creativecommons.org/publicdomain/zero/1.0/deed
let result = `test`
Ui:render([
Ui:C:container({
children: [
Ui:C:mfm({ text: result })
Ui:C:postFormButton({
text: "Note"
@fu-sen
fu-sen / misskeyrelease.sh
Last active March 13, 2023 11:28
Misskey GitHub の releases 更新でノートする bot
View misskeyrelease.sh
#!/bin/sh
# crontab -e
# */5 * * * * ~~~/misskeyrelease.sh (5 分おき)
FEED_URL="https://github.com/misskey-dev/misskey/releases.atom" # 参照する Feed(ATOM)
TEMP_FILE="/home/ユーザー/~/misskeyrelease.txt" # 最新リンクを保存するファイル
MISSKEY_TOKEN="01234567890123456789012345678901" # アクセストークン (設定 - API から。「ノートを作成・削除する」を有効にする)
MISSKEY_INSTANCE="misskey.example.com" # インスタンス名 misskey.io など
MISSKEY_NOTEMODE="public" # 公開モード public local followers specified
@fu-sen
fu-sen / misskey-times-bot.sh
Last active January 25, 2023 06:05
Misskey 時報 Bot
View misskey-times-bot.sh
#!/bin/sh
# crontab -e
# 0 * * * * ~~~/misskey-times-bot.sh (毎時 0 分)
# 0,30 * * * * ~~~/misskey-times-bot.sh (毎時 0 分・30 分)
MISSKEY_TOKEN="01234567890123456789012345678901" # アクセストークン (設定 - API から。「ノートを作成・削除する」を有効にする)
MISSKEY_INSTANCE="misskey.example.com" # インスタンス名 misskey.io など
MISSKEY_NOTEMODE="public" # 公開モード public local followers specified
@fu-sen
fu-sen / README.md
Last active January 17, 2023 04:58
Note to Misskey using cUrl | cUrl で Misskey へノート(投稿)する。
View README.md
  • Use curl.exe instead of curl on Windows
  • Issuing an (Access Token): Settings - API
  • (Post Mode):、public, home, followers or specified
  • (Instance Domain): example misskey.io
@fu-sen
fu-sen / misskey.src
Created January 8, 2023 11:29
Misskey Logo | PC-G850 assembler https://misskey.io/notes/99qk856nvw
View misskey.src
10 LD HL,GB0
20 LD DE,0FF00H
30 LD C,6
40_PSLP:
50 PUSH BC
60 LD A,D
70 ADD A,1
80 LD D,A
90 LD E,0
100 LD B,144
@fu-sen
fu-sen / Caddyfile
Last active November 25, 2022 02:30
Returning http status "410 Gone" on web server Caddy.
View Caddyfile
example.com
respond "410 Gone" 410
@fu-sen
fu-sen / phpinfo.php
Last active June 2, 2021 04:14
phpinfo() with IBM Cloud Functions - This output will be the Plain Text version.
View phpinfo.php
<?php
function main(array $args) : array
{
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
return [
"headers" => ['Content-Type' => 'text/plain'],
@fu-sen
fu-sen / README.md
Last active June 2, 2021 01:06
Use PHP 8.0 with IBM Cloud Functions
View README.md
ibmcloud fn action create <ACTION-NAME> --docker openwhisk/action-php-v8.0 FILE.php --web true

If you were already using the PHP 7.3 runtime, you can run ibmcloud fn action update instead.
You can zip multiple files with .zip instead of FILE.php and specify it.
The source will work almost in common with the PHP 7.3 runtime.
This operation requires CLI to edit the source. (Cannot be edited from the console)