Skip to content

Instantly share code, notes, and snippets.

View Mass-ms's full-sized avatar

Mass Mass-ms

  • 04:34 (UTC +09:00)
View GitHub Profile
@Mass-ms
Mass-ms / lostcities_biosphere_custom.jsonc
Last active September 11, 2025 15:09
Solarpunk Biosphere: A custom profile for McJty's The Lost Cities
{
// Solarpunk Biosphere: A custom profile for McJty's The Lost Cities
// https://www.curseforge.com/minecraft/mc-mods/the-lost-cities
// Created by Mass on 25/09/12
// Tested on Forge 1.20.1 - 47.4.0
// "This file is written in JSONC—please strip all comments and save it as .json before you use"
// This code is dedicated to the public domain under the Unlicense. See https://unlicense.org/ for details.
"cities": {
"__readonly__": "This profile is read only and cannot be modified! If you want to make a new profile based on this then you can make a copy to a new name",
# =============================================================================
# Studio One Project Archiver - v2.0
# 音楽プロジェクトファイルを指定の形式で自動的に整理・アーカイブするスクリプト
# v2.0: Vocalフォルダのコピーを取る処理の追加、カラオケ音源も2Mixフォルダに含めるように修正 2025/07/18
# 初版公開: 2025/07/17
# UTF-8 with BOM で保存すること
#
# Created by Mass on 25/07/17
# This code is dedicated to the public domain under the Unlicense. See https://unlicense.org/ for details.
@Mass-ms
Mass-ms / excalibrain-translucent.css
Created June 18, 2025 08:28
Excalibrainの背景を透明にするcssスぺニット
.excalidraw-wrapper {
background-color: transparent;
}
.excalidraw {
background-color: transparent !important;
}
@Mass-ms
Mass-ms / AdjustSrtByAudioClip.lua
Created February 24, 2025 02:40
DaVinci Resolveで音声の配置と字幕の内容から新たなsrtファイルを生成するスクリプト
resolve = Resolve()
projectManager = resolve:GetProjectManager()
project = projectManager:GetCurrentProject()
mediaPool = project:GetMediaPool()
rootFolder = mediaPool:GetRootFolder()
clips = rootFolder:GetClips()
-- フレーム番号を時間コードに変換する関数
function framesToTimecode(frame, fps)
local hours = math.floor(frame / (3600 * fps))
@Mass-ms
Mass-ms / AddAudioClipToTimeline.lua
Created February 13, 2025 12:27
DaVinci Resolveで字幕の位置に音声ファイルを配置するluaスクリプト
resolve = Resolve()
projectManager = resolve:GetProjectManager()
project = projectManager:GetCurrentProject()
mediaPool = project:GetMediaPool()
rootFolder = mediaPool:GetRootFolder()
clips = rootFolder:GetClips()
-- 音声を配置するタイムラインID
local audioTrackIndex = 2
@Mass-ms
Mass-ms / generator.py
Created February 11, 2025 14:50
Easy Chord Progression Generator
# coding: utf-8
import random
# ステートマシンの遷移を定義
# VI* はピカルディ終止の VI
# テンションノートは適宜つけ外ししてください
transitions = {
"IM7": ["IM7", "IIm7", "IIIm7", "IVM7", "V7", "VIm7", "VIIm7-5", "IIm7/V", "IV/V"],
"I7": ["IVM7"],
"IIm7": ["IM7", "IIIm7", "V7", "VIm7", "IIm7/V", "IV/V", "VI*"],
@Mass-ms
Mass-ms / GoogleNewsWatcher.gs
Created February 4, 2025 10:13
スプレッドシートに登録されたキーワードでGoogle Newsからニュースを取得するGAS
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const data = sheet.getRange('A1:B').getValues(); // スプレッドシートからA列のキーワードとB列の除外URLを取得
const discordWebhookUrl = 'YOUR_DISCORD_WEBHOOK_URL';
data.forEach(row => {
const keyword = row[0];
const excludeUrl = row[1];
if (!keyword) return;
@Mass-ms
Mass-ms / RaindropReminder.gs
Created November 25, 2024 09:58
RaindropのブックマークをDiscordのチャンネルにリマインドする
const RAINDROP_API_TOKEN = 'SetYourRaindropTokenHere';
const DISCORD_WEBHOOK_URL = 'SetYourWebHookURLHere';
function notifyRandomBookmarksToDiscord() {
const bookmarks = getRaindropBookmarks();
if (bookmarks && bookmarks.length > 0) {
const randomBookmarks = getRandomItems(bookmarks, 3);
randomBookmarks.forEach(bookmark => {
const message = `@here \nNew Bookmark: ${bookmark.title}\nURL: ${bookmark.link}`;
sendToDiscord(message);
@Mass-ms
Mass-ms / GmailDiscordHook.gs
Last active November 25, 2024 09:57
未読かつ重要なGmailをDiscordに通知する
function hook() {
const webhook = "SetYourWebHookURLHere";
// 現在の日付から半年(約180日)前の日付を計算
const today = new Date();
const sixMonthsAgo = new Date(today);
sixMonthsAgo.setDate(today.getDate() - 180);
// 日付をGmailの検索クエリ用にフォーマット
const formattedDate = Utilities.formatDate(sixMonthsAgo, Session.getScriptTimeZone(), 'yyyy/MM/dd');
// 未読のメッセージを取得する
@Mass-ms
Mass-ms / raw2wav.py
Last active January 10, 2024 08:38
Convert RAW file (16bit 16kHz Mono) to WAV file
import argparse
import soundfile as sf
# You can use this script like "python raw2wav.py -i input.raw -o output.wav -r 16000"
# Probably you have to run "pip install argparse soundfile numpy"
# Set Parser
parser = argparse.ArgumentParser(description="Convert RAW to WAV")
parser.add_argument("-i", "--input", required=True, help="Input RAW file")
parser.add_argument("-o", "--output", required=True, help="Output WAV file")