Skip to content

Instantly share code, notes, and snippets.

View hajimehoshi's full-sized avatar
:octocat:
ギットハブ

Hajime Hoshi hajimehoshi

:octocat:
ギットハブ
View GitHub Profile
@hajimehoshi
hajimehoshi / Makefile
Created February 28, 2012 16:29
wxMac 2.8 Test
TARG := wxtest
run: $(TARG).app
open $<
$(TARG).app: $(TARG)
mkdir -p $@/Contents/MacOS
cp $< $@/Contents/MacOS
$(TARG): main.cpp
@hajimehoshi
hajimehoshi / test.rb
Created May 23, 2012 10:11
Rroonga Test
# -*- coding: utf-8 -*-
require 'groonga'
Groonga::Database.create(path: '/tmp/test.db')
Groonga::Schema.define do |schema|
schema.create_table('ChannelNames',
type: :hash,
key_type: 'ShortText') do |table|
@hajimehoshi
hajimehoshi / test.ts
Created December 5, 2012 15:04
TypeScript Sadness
module b {
class Foo {
public foo() {
console.log('B foo');
}
}
}
module a {
@hajimehoshi
hajimehoshi / .gitconfig
Created December 10, 2012 11:15
.gitconfig
[merge]
ff = false
[pull]
rebase = true
@hajimehoshi
hajimehoshi / main.go
Created October 4, 2013 17:30
Show a Cocoa window by Go
package main
// #cgo CFLAGS: -x objective-c
// #cgo LDFLAGS: -framework Cocoa
// #import <Cocoa/Cocoa.h>
//
// void run() {
// @autoreleasepool {
@hajimehoshi
hajimehoshi / index.html
Created February 15, 2015 12:54
Simplest WebGL example
<!DOCTYPE html>
<style>
html, body {
position: relative;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
#canvas {
@hajimehoshi
hajimehoshi / test.go
Created June 22, 2015 16:02
OpenGL: Fail on Windows
package main
import (
"fmt"
"log"
"runtime"
"github.com/go-gl/gl/v2.1/gl"
"github.com/go-gl/glfw/v3.1/glfw"
)
@hajimehoshi
hajimehoshi / test.c
Last active August 29, 2015 14:23
OpenGL: Fail on Windows on Paralells
#include <assert.h>
#include <stdio.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include "GLFW/glfw3.h"
PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
@hajimehoshi
hajimehoshi / .emacs
Last active August 28, 2019 15:28
.emacs
(prefer-coding-system 'utf-8-unix)
(setq-default indent-tabs-mode nil)
(global-auto-revert-mode 1)
(global-set-key "\C-h" 'delete-backward-char)
(global-set-key "\C-j" 'newline-and-indent)
(electric-indent-mode 0)
@hajimehoshi
hajimehoshi / index.html
Created August 24, 2015 16:42
tsc.js on browser
<!DOCTYPE html>
<script>
'use strict';
var require = (function() {
class FS {
writeSync(fd, buffer, offset, toWrite) {
// TODO: Implement
console.log(buffer.str_);
}