Skip to content

Instantly share code, notes, and snippets.

View GOROman's full-sized avatar
😀
Good

GOROman GOROman

😀
Good
  • XVI Inc.
  • Japan
  • 03:16 (UTC +09:00)
  • X @GOROman
View GitHub Profile
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[InitializeOnLoad]
// 大草原クラス
class WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
{
@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]()
@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;
@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
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active April 24, 2024 16:08
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@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)
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
@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";