Skip to content

Instantly share code, notes, and snippets.

View xreiju's full-sized avatar

Reiju xreiju

View GitHub Profile
@xreiju
xreiju / nowplaying.js
Last active December 26, 2018 15:03
osascript -l JavaScript nowplaying.js
const iTunes = Application('iTunes')
const app = Application.currentApplication()
app.includeStandardAdditions = true
const hookURL = 'https://misskey-hook.firebaseapp.comで取得して'
function getTrack(iTunes) {
return iTunes.currentTrack()
}
function getTrackData(iTunes) {
@xreiju
xreiju / misskey_reaction.js
Last active May 5, 2021 12:21
Show the reactions for the specified noteId #misskey
// Requirement: node-fetch
// How it works:
// $ node misskey_reaction.js xxxxxxxxxxxxxxxxx(noteId)
// $ node misskey_reaction.js https://${host}/notes/xxxxxxxxxxxx(noteId)
// You need to put your token here to get it working.
const i = '!YOUPUTYOURTOKENHERETOGETTHISPROGRAMTOWORK'
//
const fetch = require('node-fetch')

Keybase proof

I hereby claim:

  • I am xreiju on github.
  • I am reiju (https://keybase.io/reiju) on keybase.
  • I have a public key ASDTCwMgBGOHAkIUqZ1HME9SYToi1VZHGVWONc25g21n0Qo

To claim this, I am signing this object:

@xreiju
xreiju / misskey_en.md
Last active February 13, 2019 05:17
[Introducing Misskey (en)]

Introducing Misskey

Because you came to this kind of service, I won't explain about some easy things. You must've known how things work.

Basically, the explanations are based on PC version. You can also change those settings in Smartphone version.

I don't like round-shaped icons

You can disable this at Settings -> Web -> Use circle icons.

@xreiju
xreiju / misskey.md
Last active March 15, 2021 10:56
Misskey入門.md

Misskey入門

登録、投稿などの基本操作にはすぐに慣れるでしょうから、ここでは触れません!

なお、PC版を使っていることを前提に記述していますが、スマホ版でも似たような手段で設定を変更することができます。

アイコンが丸いのが嫌

設定 -> Web -> 円形のアイコンを使用 のところから、四角いアイコンへ変更できます。

@xreiju
xreiju / misskey_spotify_nowplaying.py
Last active May 9, 2023 11:39
Spotifyの#nowplayingをMisskeyに投稿したいだろ
# requirements: request, spotipy(needs MANUAL installation)
# $ python3 misskey_spotify_nowplaying.py <spotify ID> (silent)
# silentが指定されている場合、Misskeyにpostされずに投稿内容のプレビューのみを実行します。
# 2018/08/20: tokenではなくmisskey-hookを使うように変更しました。以前は"i"を使っていました。履歴参照。
import json, sys, urllib.request
import spotipy
import spotipy.util as util
@xreiju
xreiju / app.d
Created August 5, 2018 04:47
dependency: vibe-d
import vibe.http.websockets;
import vibe.core.log;
import vibe.core.core;
import vibe.inet.url;
import std.json;
import std.net.curl;
import std.parallelism;
import std.random;
import std.concurrency;
import std.stdio;

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@xreiju
xreiju / test.c
Last active December 26, 2017 08:28
#include <stdio.h>
#include <SDL2/SDL.h>
int main() {
SDL_Init(SDL_INIT_VIDEO);
SDL_Window* window;
SDL_Renderer* renderer;
SDL_CreateWindowAndRenderer(300, 300, SDL_RENDERER_PRESENTVSYNC, &window, &renderer);
int running = 1;
@xreiju
xreiju / app.d
Created December 26, 2017 08:21
import std.stdio;
import derelict.sdl2.sdl;
void main()
{
DerelictSDL2.load();
SDL_Init(SDL_INIT_VIDEO);
scope(exit) SDL_Quit();
SDL_Window* window;