Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using BaseX;
namespace CodeX
{
@rniwase
rniwase / sirenmachine.c
Last active May 4, 2022 20:55
サイレンマシーンforGB proto
/* use gbdk-2020 4.0.6 */
/* <path-to-gbdk-env>/bin/lcc -Wa-l -Wl-m -Wl-j -o sirenmachine.gb sirenmachine.c */
#include <gb/gb.h>
#include <stdio.h>
#include <gbdk/console.h>
UBYTE previous_keys;
BYTE keys;
#define UPDATE_KEYS() previous_keys = keys; keys = joypad()
@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active April 4, 2024 13:42
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
import std.stdio;
import std.array;
import std.utf;
void main() {
string s = "AあBい";
foreach(c; array(s)) {
foreach(b; [c].toUTF8) {
writef("%02x ", b);
}
@urin
urin / makefile
Last active October 20, 2023 15:18
makefile - simple template to make an executable from *.cpp files.
COMPILER = g++
CFLAGS = -g -MMD -MP -Wall -Wextra -Winit-self -Wno-missing-field-initializers
ifeq "$(shell getconf LONG_BIT)" "64"
LDFLAGS =
else
LDFLAGS =
endif
LIBS =
INCLUDE = -I./include
TARGET = ./bin/$(shell basename `readlink -f .`)