Skip to content

Instantly share code, notes, and snippets.

View n0mimono's full-sized avatar

Ryota Yokote n0mimono

View GitHub Profile
ffmpeg -re -loop 1 -f image2 -i path/to/your/image.jpg -r 10 -f lavfi -i anullsrc -c:v libx264 -preset ultrafast -tune stillimage -pix_fmt yuv420p -b:v 100k -maxrate 100k -bufsize 200k -g 40 -c:a aac -ar 44100 -b:a 64k -f flv rtmp://a.rtmp.youtube.com/live2/your_stream_key

Controlnet with Colaboratory

!nvidia-smi

# download web-ui
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui

# download controlnet as extensions
!git clone https://github.com/Mikubill/sd-webui-controlnet /content/stable-diffusion-webui/extensions/sd-webui-controlnet
@n0mimono
n0mimono / note.md
Last active June 15, 2022 20:38
相談的なやつのメモ

概要

「CTO採用したいんやがどんな人採用すればいいかわからん」と聞かれることあるので、自分のスタートアップのCTO感をここにふらっとまとめてみる。

CTO

そもそもCTOは

  • 経営チームのメンバーである
  • すなわち経営職である
@n0mimono
n0mimono / pbr.glsl
Created June 11, 2021 09:18 — forked from galek/pbr.glsl
PBR GLSL SHADER
in vec2 v_texcoord; // texture coords
in vec3 v_normal; // normal
in vec3 v_binormal; // binormal (for TBN basis calc)
in vec3 v_pos; // pixel view space position
out vec4 color;
layout(std140) uniform Transforms
{
mat4x4 world_matrix; // object's world position
@n0mimono
n0mimono / note.md
Last active May 23, 2022 09:59
Unity 2019 LTS vs 2020 LTS, Android

概要

Unity 2020 LTS Android の特に差分の大きい部分についてのメモ

IL2CPP

次のように、gradle buildするときにIL2CPPのコードをビルドするように変わっているらしい。

  • 2019
    • Unity Editorビルド
public struct UnityVersion
{
public int stream;
public int number;
public int minor;
public string phase;
public int revision;
public UnityVersion(string unityVersion)
{
@n0mimono
n0mimono / AppDelegate.swift
Last active October 23, 2020 05:28
Unity-as-a-Library Sample Code
import UIKit
import UnityFramework
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
func unityFramewokLoad() -> UnityFramework? {
let bundlePath = "\(Bundle.main.bundlePath)/Frameworks/UnityFramework.framework"
let bundle = Bundle(path: bundlePath)
if let bundle = bundle, !bundle.isLoaded {
@n0mimono
n0mimono / index.html
Created May 3, 2020 14:34
mini pubsub
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/style.css" type="text/css">
<title>---</title>
# ref: https://qiita.com/shippokun/items/9070fc58f69d8c063e44
# list
diskutil list
# erase data
diskutil unMountDisk /dev/disk2
#diskutil eraseDisk MS-DOS boot /dev/disk2
# burn image
@n0mimono
n0mimono / NumberingAssetRenamer.cs
Last active November 12, 2019 09:53
ゲーム開発中とかによくあるファイル名が連番としてアセットをいい感じに一括リネームしたいときに役立つやつ
using System;
using System.Linq;
using System.IO;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif