Skip to content

Instantly share code, notes, and snippets.

View example.c
#include <stdio.h>
#define IS_ARRAY(ary) ((void*)(ary) == (void*)&(ary))
#define TEST(ary, expected) \
printf( \
"%s:%u: expected %s, actually %s\n", \
__FILE__, \
__LINE__, \
expected, \
(IS_ARRAY(ary) ? "array" : "ptr"))
yugui /
Last active September 10, 2019 13:51

Keybase proof

I hereby claim:

  • I am yugui on github.
  • I am yugui ( on keybase.
  • I have a public key ASAfseopmrn1MrW_aSjjSeTm_IjW98wEtRAO6LjvmGNAmAo

To claim this, I am signing this object:

View custom-options.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: custom-options.proto
Package main is a generated protocol buffer package.
It is generated from these files:
It has these top-level messages:
View 05-002-datafile
On the 6th of May, 1709, I took a solemn leave of his majesty, and
my friends. This prince was so gracious as to order a guard to
conduct me to Glanguenstald, which is a royal port to the south-
west part of the island. In six days I found a vessel ready to
carry me to Japan, and spent fifteen days in the voyage.
yugui / romantable.txt
Last active November 14, 2016 05:03
roman-kana mapping table for Google Japanese Input to type Japanese characters with ANSI keyboard
View romantable.txt
3 あ
e い
4 う
5 え
6 お
# ぁ
E ぃ
$ ぅ
% ぇ
^ ぉ
View python.bzl
load("@com_github_gengo_rules_pypi//pypi:def.bzl", "pypi_universal_repository")
name = "library",
srcs = glob(["lib/python*/site-packages/**/*.py"]),
imports = [
View main.go
package main
import (
func main() {
const input = `{"create_request": {"key": "Zm9v"}}`
View example.proto
syntax = "proto3";
package example;
message Example {
oneof oneof_field {
string string_value = 1;
int32 int32_value = 2;
yugui /
Last active May 7, 2016 02:08
Objective C99++11
g++ -framework Foundation -std=gnu++14 -lobjc
yugui / extension.ja.rdoc
Last active May 27, 2023 08:36
extension.ja.rdoc -- extension library
View extension.ja.rdoc


Cの世界で定義されたデータ(構造体)をRubyのオブジェクトとして 取り扱いたい場合がありえます.このような場合はTypedData_XXX マクロ群を用いて構造体へのポインタとRubyのオブジェクトとを互 いに変換できます.

# 古い(非Typedな)Data_XXXマクロ群は非推奨になりました.

# 将来のバージョンのRubyでは古いマクロは動作しなくなる可能性があります.