Skip to content

Instantly share code, notes, and snippets.

View GOROman's full-sized avatar
😀
Good

GOROman GOROman

😀
Good
  • XVI Inc.
  • Japan
  • 07:46 (UTC +09:00)
  • X @GOROman
View GitHub Profile
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[InitializeOnLoad]
// 大草原クラス
class WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
{
@yoshitaka-xvi
yoshitaka-xvi / ProjectionMatrixSetter.cs
Created September 5, 2017 04:20
Unity 2017.2.0b10で、Immersiveヘッドセット向け描画でNearClipとFarClipを変更するためのUnityコンポーネント
using UnityEngine;
public class ProjectionMatrixSetter : MonoBehaviour {
Camera main;
[SerializeField]
float nearClip = 0.01f;
[SerializeField]
float farClip = 500.0f;
@flarb
flarb / VRInputModule.cs
Created August 20, 2014 22:27
Lets you use a VR world space cursor with World Space Canvases in Unity3D 4.6. Add this to the EventSystem object. Put some box colliders on your buttons in the World Space Canvas. Then, do a trace to see if you're looking at a menu object--if the trace hits one of those buttons, pass it to SetTargetObject. See ralphbarbagallo.com for a longer e…
using UnityEngine;
using UnityEngine.EventSystems;
//by Ralph Barbagallo
//www.flarb.com
//www.ralphbarbagallo.com
//@flarb
public class VRInputModule : BaseInputModule {
@codePrincess
codePrincess / .swift
Created August 2, 2017 15:39
Smooth doodling with coalesced touches
override public func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let touch = touches.first else {
return
}
UIGraphicsBeginImageContextWithOptions(bounds.size, false, 0.0)
let context = UIGraphicsGetCurrentContext()
image?.draw(in: bounds)
var touches = [UITouch]()
@onetransistor
onetransistor / bluepill.ioc
Created September 18, 2018 19:40
STM32CubeMX Project for STM32 blue pill development board
#MicroXplorer Configuration settings - do not modify
File.Version=6
KeepUserPlacement=false
Mcu.Family=STM32F1
Mcu.IP0=NVIC
Mcu.IP1=RCC
Mcu.IP2=RTC
Mcu.IP3=SYS
Mcu.IP4=USB
Mcu.IPNb=5
diff -r 1/linux-z7213/.gitignore 2/linux-z7213/.gitignore
100a101,106
>
> # for yocto recipes-kernel build
> arch/arm/boot/vmlinux
> oe-logs
> oe-workdir
> source
diff -r 1/linux-z7213/arch/arm/include/asm/uaccess.h 2/linux-z7213/arch/arm/include/asm/uaccess.h
162c162
@ash-r1
ash-r1 / userscript.js
Last active June 28, 2023 05:26
Bing AIの入力フォームでIME変換中のEnterでは送られないようにする
// ==UserScript==
// @name ChatGPT Enter Fix (GPT4)
// @name:ja ChatGPT Enter Fix (GPT4)
// @namespace http://tampermonkey.net/
// @description This Chrome/Safari extension addresses the issue where ChatGPT sends text even when the Enter key is pressed during Japanese conversion.
// @description:ja ChatGPTにおいて日本語IMEで変換中にEnterを押した時に送信されてしまうの問題を阻止します。 Safariにも対応。
// @version 2.1
// @author satosh1suzuk1, d-engine
// @match https://chat.openai.com
// @match https://chat.openai.com/*
@gpsnmeajp
gpsnmeajp / hello_nostr.dart
Last active July 29, 2023 18:49
DartでNostrのTLを眺めるやつ
// flutter pub add nostr
import 'dart:convert';
import 'dart:io';
import 'package:nostr/nostr.dart';
//自分の公開鍵(16進数。https://damus.io/key/ で変換できる)
const yourPubKeyHex =
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
@standarddeviant
standarddeviant / wake_on_motion_from_deep_sleep.ino
Created July 6, 2020 03:38
M5StickC wake-on-motion MPU6886 interrupt IMU motion MPU
#include <Arduino.h>
#include <M5StickC.h>
#include <utility/MPU6886.h> // used for accessing MPU constants
#include <driver/rtc_io.h>
void mpu6886_wake_on_motion_isr(void); // declaration of ISR
void mpu6886_wake_on_motion_setup(void); // declaration of setup
// lifted from https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp
// if integrated with M5StickC library, use internal class function instead
@scivision
scivision / AddGitSubmodule.cmake
Last active March 18, 2024 14:02
CMake: init/update a Git submodule and add_subdirectory()
find_package(Git REQUIRED)
function(add_git_submodule dir)
# add a Git submodule directory to CMake, assuming the
# Git submodule directory is a CMake project.
#
# Usage: in CMakeLists.txt
#
# include(AddGitSubmodule.cmake)
# add_git_submodule(mysubmod_dir)