Skip to content

Instantly share code, notes, and snippets.

View totegamma's full-sized avatar

totegamma totegamma

View GitHub Profile
@totegamma
totegamma / apply_subbones.py
Last active October 25, 2023 11:31
つかいかた: アーマチュアを選択した状態で、nキーを押すと出てくるメニューのtoolにあるApply Subbonesボタンを押すだけ (https://gammalab.net/works/applysubbones/)
import bpy
import re
import sys
bl_info = {
"name" : "Apply Subbones",
"author" : "totegamma",
"version" : (0, 1, 0),
"blender" : (3, 3, 0),
"description" : "Apply Subbone weights and cleanup them.",
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
function myFunction() {
const sheet = SpreadsheetApp.getActive().getActiveSheet();
const client_id = sheet.getRange("B1").getValue();
const client_secret = sheet.getRange("D1").getValue();
const f1 = sheet.getRange("F1").getValue();
const playlist_id = f1.startsWith("https://open.spotify.com/") ? f1.slice(34, f1.indexOf('?')) : f1;
const keytuple = client_id + ":" + client_secret;
const client64 = Utilities.base64Encode(keytuple, Utilities.Charset.UTF_8);
"-=-=-=-=-=-=-=-=-=-=--"
" .vimrc "
" created by thotgamma "
" https://gammalab.net "
"-=-=-=-=-=-=-=-=-=-=-="
" プラグイン管理ツールとしてdein.vimを使う。
" ### 定数等の設定
@totegamma
totegamma / lambda_function.py
Created February 16, 2021 13:10
Amplifyのビルド通知をDiscordに送るLambda(Python)
from __future__ import print_function
import urllib.request
import json
print('Loading function')
# == :: 設定項目 :: ===========================================
endpoint = "https://discord.com/api/webhooks/YOURENDPOINT-URL"
accountName = 'YOUR ACCOUNT NAME'
accountImage = 'YOUR ACCOUNT IMAGE URL'
@totegamma
totegamma / test.json
Created February 15, 2021 17:26
AWS Cloud-Watch Alarm Event via SNS
{
"Records":[
{
"EventSource":"aws:sns",
"EventVersion":"1.0",
"EventSubscriptionArn":"arn:aws:sns:ap-northeast-1:<省略>",
"Sns":{
"Type":"Notification",
"MessageId":"<省略 なんかID>",
"TopicArn":"arn:aws:sns:ap-northeast-1:<省略>",
@totegamma
totegamma / hls_stream.h
Created August 17, 2020 12:38
vivadoHLSのstreamを検証用に簡易的に実装したものです
#include <stdio.h>
#include <queue>
namespace hls {
template <typename T>
class stream {
const char* name;
std::queue<T> queue;
<?php
$todofuken=array(
'北海道'=>'hokkaido',
'青森県'=>'aomori',
'岩手県'=>'iwate',
'宮城県'=>'miyagi',
'秋田県'=>'akita',
'山形県'=>'yamagata',
'福島県'=>'fukushima',
mat_coo_t* create_coo_from_mmfile(const char* filename) {
MTR_BEGIN_FUNC();
const int BufferSize = 1024;
FILE* fp = fopen(filename, "r");
char line[BufferSize];
int state = 0; //0: size, else: content
mat_coo_t* coo;
int itr = 0;
"-=-=-=-=-=-=-=-=-=-=--"
" .vimrc "
" created by thotgamma "
" https://gammalab.net "
"-=-=-=-=-=-=-=-=-=-=-="
" プラグイン管理ツールとしてdein.vimを使う。
" ### 定数等の設定