Skip to content

Instantly share code, notes, and snippets.

View hiroyuki's full-sized avatar
🐘

hiroyuki hori - horristic hiroyuki

🐘
View GitHub Profile
@hiroyuki
hiroyuki / SKILL.md
Last active April 22, 2026 09:57 — forked from LuD1161/SKILL.md
codex-review - claude skill file
name codex-review
description Send the current plan or uncommitted code changes to OpenAI Codex CLI for iterative review. Claude and Codex go back-and-forth until Codex approves. Max 5 rounds. In code-review mode, after approval auto-commits and merges the feature branch into main (no push).
user_invocable true

Codex Iterative Review (Plan + Code) with Auto-Commit/Merge

Send the current implementation plan or uncommitted code changes to OpenAI Codex for review. Claude revises based on Codex's feedback and re-submits until Codex approves. Max 5 rounds.

round=lambda x:(x*2+1)//2
@hiroyuki
hiroyuki / WorkerThread
Created February 13, 2020 01:20
atomic release aquire simple study in openFrameworks
#pragma once
#include "ofMain.h"
class WorkerThread : public ofThread
{
public:
bool pinpon = false;
atomic_bool isFrameNew;
int value = 0;
void threadedFunction()
{
@hiroyuki
hiroyuki / BadSim.h
Last active June 18, 2019 09:02
badminton simlate
#pragma once
#include "ofMain.h"
class BadSim
{
public:
const float mass = 5.19;
const float grav = 9.80665;
const float terminal_velocity = 6.7;
float scale = 30; // 30 pix == 1m
@hiroyuki
hiroyuki / noise.frag
Created April 12, 2017 06:00
noise generate by GLSL
//
// Description : Array and textureless GLSL 2D/3D/4D simplex
// noise functions.
// Author : Ian McEwan, Ashima Arts.
// Maintainer : ijm
// Lastmod : 20110822 (ijm)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
//
// fragment shader
#version 150
// this is how we receive the texture
uniform sampler2D tex0;
in vec2 varyingtexcoord;
out vec4 outputColor;
void main()
{
@hiroyuki
hiroyuki / scaling image with anchor point
Created May 2, 2013 09:37
scaling image with anchor point
void testApp::setup()
{
img.loadImage("history.png");
ofSetWindowShape(img.getWidth(), img.getHeight());
scale = 1.0;
}
void testApp::update()
{
@hiroyuki
hiroyuki / .gitignore
Last active December 14, 2015 06:59
horristic gitignore (windows VS added)
*.mov
*.jpg
*.aif
*.mpeg
*.exe
*.exp
*.ilk
*.pdb
*.lib
*.otf
@hiroyuki
hiroyuki / gist:3827613
Created October 3, 2012 15:34
Point inside the polygon
//http://alienryderflex.com/polygon/
bool tricks::math::pointInsidePolygon(ofVec2f &p, const vector<ofVec2f> &polygon, int resolution){
int counter = 0;
int i;
double xinters;
ofVec2f p1,p2;
float x = p.x;
float y = p.y;
@hiroyuki
hiroyuki / gist:3781210
Last active January 18, 2019 08:26
cartesian<>Polar
/**
* converts cartesion to polar coordinates
* result:
* [0] = length
* [1] = angle z-axis rotation [-PI, PI](range) Z軸回転
* [2] = angle of projection into x,y, plane with x-axis [-PI, PI](range)
*/
static ofVec3f cartesianToPolar(const ofVec3f &v)
{
ofVec3f polar;