Skip to content

Instantly share code, notes, and snippets.

@iRi-E
iRi-E / YouTube_Mute_Ads.user.js
Created December 9, 2023 17:40
Userscript that reduces the sound of YouTube video ads and can also change their playback speed
// ==UserScript==
// @name YouTube Mute Ads
// @namespace https://gist.github.com/iRi-E
// @version 0.1
// @description Reduce the sound of YouTube video ads
// @author iRi_E
// @license MIT
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
@iRi-E
iRi-E / YouTube_Autoskip_Ads.user.js
Last active April 27, 2024 15:28
Userscript that automatically clicks a skip button on YouTube video ads
// ==UserScript==
// @name YouTube Autoskip Ads
// @namespace https://gist.github.com/iRi-E
// @version 0.3.2
// @description Automatically click skip button on YouTube video ads
// @author iRi_E
// @license MIT
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
@iRi-E
iRi-E / register-blender-thumbnailer.sh
Created August 20, 2019 15:52
Linuxデスクトップのファイルマネージャーで.blendファイルのサムネイルを表示させるように設定するスクリプト
#!/bin/bash
# run this script in a directory in which blender-thumbnailer.py exists.
# add command line option '-u' to unregister the thumbnailer.
BINDIR=/usr/local/bin
if [ -n "$XDG_DATA_HOME" ]; then
SHAREDIR="$XDG_DATA_HOME"
else
SHAREDIR="$HOME/.local/share"
@iRi-E
iRi-E / stock_price.py
Created November 10, 2015 14:02
Blender script that displays a stock price on 3D viewport
import bpy, blf
import re, urllib.request
def getPrice(stockNum):
url = 'http://stocks.finance.yahoo.co.jp/stocks/detail/?code={}.T'.format(stockNum)
price = ''
name = ''
with urllib.request.urlopen(url) as f:
@iRi-E
iRi-E / TestGUI_Ubuntu12.04_amd64.patch
Created July 15, 2012 18:42
TestGUIをUbuntu 12.04 amd64でビルドするパッチ
diff -ur StandProject.orig/StandConverter.pro StandProject/StandConverter.pro
--- StandProject.orig/StandConverter.pro 2012-07-16 00:07:16.000000000 +0900
+++ StandProject/StandConverter.pro 2012-07-16 03:15:20.753276875 +0900
@@ -1,16 +1,22 @@
-QT += core
+QT += core
QT += gui
-QT += multimedia
+CONFIG += mobility
+MOBILITY = multimedia
diff --git a/QMA/plugins/QMAOpenJTalkPlugin/QMAOpenJTalkModel.h b/QMA/plugins/QMAOpenJTalkPlugin/QMAOpenJTalkModel.h
index ac7b76f..3c39998 100644
--- a/QMA/plugins/QMAOpenJTalkPlugin/QMAOpenJTalkModel.h
+++ b/QMA/plugins/QMAOpenJTalkPlugin/QMAOpenJTalkModel.h
@@ -37,6 +37,7 @@
#ifndef QMAOPENJTALKMODEL_H
#define QMAOPENJTALKMODEL_H
+#include <QtCore/QMutex>
#include <QtCore/QHash>
diff --git a/QMA/QMAWidget.cc b/QMA/QMAWidget.cc
index 00cfcad..ba6eeb8 100644
--- a/QMA/QMAWidget.cc
+++ b/QMA/QMAWidget.cc
@@ -215,7 +215,7 @@ void QMAWidget::setBaseMotion(MMDAI::PMDObject *object, MMDAI::IMotionLoader *lo
{
MMDAI::MotionPlayer *player = object->getMotionManager()->getMotionPlayerList();
for (; player != NULL; player = player->next) {
- if (player->active && MMDAIStringEqualsIn(player->name, "base", 4) == 0) {
+ if (player->active && MMDAIStringEquals(player->name, "base")) {
diff --git a/QMA/QMALipSyncLoader.cc b/QMA/QMALipSyncLoader.cc
index 48bcdf4..b71f95a 100644
--- a/QMA/QMALipSyncLoader.cc
+++ b/QMA/QMALipSyncLoader.cc
@@ -43,6 +43,7 @@
#include <QStringList>
#include <QTextCodec>
#include <QTextStream>
+#include <QDebug>
diff --git a/QMA/QMAWindow.cc b/QMA/QMAWindow.cc
index ad68606..366fe57 100644
--- a/QMA/QMAWindow.cc
+++ b/QMA/QMAWindow.cc
@@ -261,8 +261,11 @@ void QMAWindow::togglePhysicSimulation()
MMDAI::SceneController *controller = m_widget->getSceneController();
int count = controller->countPMDObjects();
m_enablePhysicsSimulation = !m_enablePhysicsSimulation;
- for (int i = 0; i < count; i++)
- controller->getPMDObject(i)->getPMDModel()->setPhysicsControl(m_enablePhysicsSimulation);
diff --git a/MMDAI/include/MMDAI/SceneController.h b/MMDAI/include/MMDAI/SceneController.h
index 4bfb27b..0ff7be3 100644
--- a/MMDAI/include/MMDAI/SceneController.h
+++ b/MMDAI/include/MMDAI/SceneController.h
@@ -72,6 +72,7 @@ public:
void initializeScreen(int width, int height);
PMDObject *allocatePMDObject();
+ PMDObject *getSelectedPMDObject();
PMDObject *findPMDObject(PMDObject *object);