Skip to content

Instantly share code, notes, and snippets.

@cignoir
cignoir / zbrush_tooltip_bug_623847.md
Created August 25, 2023 03:32
ZBrush サブツールのツールチップが正しく表示されない不具合

※不具合はサポート報告済みです

■ 不具合の概要

  • サブツールにフォルダがある場合にマウスカーソルを乗せたサブツールとは別のサブツールのツールチップを表示することがある
  • ZBrush 2023/2022 で再現

image

■ 一時的な対策

簡単に書くとフォルダの開閉やサブツールの選択状態によって

require 'mini_magick'
require 'complex'
require 'fileutils'
psd_path = ARGV[0]
psd = MiniMagick::Image.new(psd_path)
work_dir = "work#{Time.now.to_i}"
FileUtils.rm_rf(work_dir)
Dir.mkdir work_dir unless File.exists?(work_dir)
@cignoir
cignoir / gist:0f047cee8e9b494a7989979f9ff1ac21
Created September 6, 2019 08:53
MiniMagickをWSLにインストール
sudo su -
apt upgrade
apt update
apt install git
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
@cignoir
cignoir / IgnTest.pde
Created August 16, 2019 11:47 — forked from keijiro/IgnTest.pde
Interleaved gradient noise test.
float frac(float x)
{
return x - floor(x);
}
float gradientNoise(float x, float y)
{
float f = 0.06711056f * x + 0.00583715f * y;
return frac(52.9829189f * frac(f));
}
@cignoir
cignoir / install_growi3.3.6_amazon_linux2.md
Last active February 6, 2019 01:07
Growi 3.3.6 on AmazonLinux2 構築メモ

Env

  • Amazon Linux 2 AMI (HVM), SSD Volume Type - ami-0d7ed3ddb85b521a6

    Amazon Linux 2 comes with five years support. It provides Linux kernel 4.14 tuned for optimal performance on Amazon EC2, systemd 219, GCC 7.3, Glibc 2.26, Binutils 2.29.1, and the latest software packages through extras.

  • メモリ1GB以下のInstanceTypeでそのままやるとメモリ不足でnpm runが通らないかも。

node.js 8.15.0

$ cd /tmp
using System;
using System.Linq;
using UnityEngine;
public class QuestionGenerator
{
private static readonly string[] Combinations = new string[]
{
"0019", "0025", "0028", "0037", "0046", "0055", "0115", "0118", "0119", "0124", "0125", "0126", "0127", "0128",
"0129", "0133", "0135", "0136", "0137", "0138", "0139", "0145", "0146", "0147", "0149", "0155", "0156", "0159",
<?php
// 一般的なルールで10を作れる552個の数字の組み合わせ
// 参考: https://ja.wikipedia.org/wiki/%E3%83%86%E3%83%B3%E3%83%91%E3%82%BA%E3%83%AB
$combinations = array("0019","0025","0028","0037","0046","0055","0115","0118","0119","0124","0125","0126","0127","0128","0129","0133","0135","0136","0137","0138","0139","0145","0146","0147","0149","0155","0156","0159","0169","0179","0189","0199","0223","0224","0225","0226","0227","0228","0229","0234","0235","0237","0238","0239","0244","0245","0246","0247","0248","0249","0255","0256","0257","0258","0259","0266","0267","0268","0278","0288","0289","0334","0337","0339","0346","0347","0349","0355","0356","0357","0358","0367","0368","0377","0378","0379","0446","0449","0455","0456","0458","0459","0466","0467","0468","0469","0477","0488","0555","0556","0557","0558","0559","0568","0569","0578","0579","0669","0679","0688","0779","0789","0889","0899","0999","1114","1115","1116","1117","1118","1119","1123","1124","1125","1126","1127","1128","1129","1133","1134","1135","1136","1137","1138","1139","1144",
@cignoir
cignoir / RemoveZeroRotation.py
Created November 21, 2017 09:11 — forked from ivogrig/RemoveZeroRotation.py
Example command for removing zero rotations from a locator item.
"""
Example command for removing zero rotations from a locator item.
Clears the zero rotation offset while maintaining the pose. Acts on all selected locator items.
Limitation: Only works if the rotation item's location is subsequent to the zero rotation item
(As by default when using the skeleton tool)
Existing animation curves are removed
Simplified example, no argument handling or command helps/configs added.
@cignoir
cignoir / company_gacha.rb
Created September 20, 2017 07:36
会社ガチャ10連
10.times.each{ puts "株式会社" + %w(システム ソリューション ジャパン テクノロジー インターネット テック コンピュータ サービス マネジメント データ トータル ビジネス エンジニアリング メディア クリエイト ソフト).shuffle.take(2).join }
@cignoir
cignoir / judge.rb
Created April 28, 2017 01:42
pawoooooo!!!
require 'mechanize'
require 'json'
timeline_url = 'https://pawoo.net/api/v1/timelines/public'
agent = Mechanize.new
agent.verify_mode = OpenSSL::SSL::VERIFY_NONE
dst_dir = 'images'