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 / HajimeHoshi_Airship_alpha.js
Last active November 20, 2015 00:55
RPG Maker MV: Airship like FF4
// This script is old and deprecated: Please see https://github.com/hajimehoshi/rpgmmv for the latest version.
(function() {
var MAX_SCALE = 1.5;
var Tilemap_initialize = Tilemap.prototype.initialize;
Tilemap.prototype.initialize = function() {
Tilemap_initialize.call(this);
this.width *= MAX_SCALE;
this.height *= MAX_SCALE;
@hajimehoshi
hajimehoshi / rpg_objects_patch.js
Created December 21, 2015 01:33
RPG Maker MV: Bug fix in Game_Action
Game_Action.prototype.decideRandomTarget = function() {
var target;
if (this.isForDeadFriend()) {
target = this.friendsUnit().randomDeadTarget();
} else if (this.isForFriend()) {
target = this.friendsUnit().randomTarget();
} else {
target = this.opponentsUnit().randomTarget();
}
if (target) {
@hajimehoshi
hajimehoshi / todo.js
Last active February 4, 2016 15:20
Mithril Tutorial in a more ES6 way
'use strict';
// http://mithril.js.org/getting-started.html in a more ES6 way.
class Todo {
constructor(data) {
this.description_ = data.description;
this.done_ = false;
}
get description() { return this.description_; }
@hajimehoshi
hajimehoshi / .tmux.conf
Last active March 1, 2016 06:48
.tmux.conf
set-option -g prefix C-t
unbind C-b
bind C-t send-prefix
setw -g mode-keys emacs
#include <assert.h>
#include <stdio.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include "GLFW/glfw3.h"
PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
package main
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@hajimehoshi
hajimehoshi / install_ebiten_on_chip.sh
Last active November 18, 2016 15:48
install_ebiten_on_chip.sh
sudo apt-get upgrade
yes | sudo apt-get install wget
yes | sudo apt-get install git
yes | sudo apt-get install gcc
yes | sudo apt-get install libglu1-mesa-dev libgles2-mesa-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev libopenal-dev
wget https://storage.googleapis.com/golang/go1.7.3.linux-armv6l.tar.gz
tar zxvf go1.7.3.linux-armv6l.tar.gz
mv go go-bin
mkdir go
echo '' >> .bashrc
@hajimehoshi
hajimehoshi / index.html
Created December 16, 2016 12:58
Atsumaru
<!DOCTYPE html>
<iframe src="index2.html" sandbox="allow-scripts allow-same-origin" style="width: 100%; height: 100%"></iframe>
@hajimehoshi
hajimehoshi / test.go
Created March 5, 2017 05:54
100 < 1 on GOARCH=arm
package main
type IF interface {
Int4(int) (int, int, int, int)
}
type impl struct{}
func (p *impl) Int4(i int) (int, int, int, int) {
return 0, 0, 16, 16
package main
import (
"image"
"log"
"math"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/peterhellberg/plasma"