Skip to content

Instantly share code, notes, and snippets.

@kishida
kishida / JavaApplication3.java
Created May 4, 2016 07:29
Java女子部福岡2016/4/30でのコード
package javaapplication3;
/**
*
* @author naoki
*/
public class JavaApplication3 {
/**
* @param args the command line arguments
@kishida
kishida / Vagrantfile
Created June 5, 2016 00:00
Install valhalla
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "126.0.56.105"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.provision "shell", inline: <<-SHELL
add-apt-repository ppa:openjdk-r/ppa
apt-get update
@kishida
kishida / AssertF.java
Last active October 6, 2016 09:25
Fluent assertion
package sample.assertabout;
import java.util.function.Function;
public class AssertF<T> {
static class AssertException extends RuntimeException {
public AssertException(String message) {
super(message);
}
@kishida
kishida / loop.mac
Last active January 1, 2018 08:07
Error Diffuse for MSX
mul3 macro
ld b, a
add a, a
add a, b
endm
mul6 macro
add a, a
ld b, a
add a, a
@kishida
kishida / LOOP.MAC
Last active January 1, 2018 21:42
Error Diffuse(Upper case)
MUL3 MACRO
LD B, A
ADD A, A
ADD A, B
ENDM
MUL6 MACRO
ADD A, A
MUL3
ENDM
@kishida
kishida / NAPO.RC
Last active January 3, 2018 04:31
Napolygon Fish for WIN32
//Microsoft App Studio generated resource script.
//
// #include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
@kishida
kishida / SmallPt.java
Created April 22, 2018 16:05
SmallPT4j without ImageIO
/*
Copyright (c) 2017 Naoki Kishida ([email protected] / twitter: @kis)
This software is released under the MIT License.
( https://github.com/kishida/smallpt4j/blob/master/LICENSE.txt )
This is based on the smallpt( http://www.kevinbeason.com/smallpt/ )
that is released under the MIT License.
( https://github.com/kishida/smallpt4j/blob/master/smallpt_LICENSE.txt )
*/
@kishida
kishida / MyFrame.java
Created April 22, 2018 18:57
Simple JFrame sample
import java.awt.BorderLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTextArea;
public class MyFrame {
public static void main(String[] args) {
JFrame f = new JFrame("test");
JTextArea ta = new JTextArea();
f.add(ta);
@kishida
kishida / FileEditor.java
Last active May 4, 2018 22:39
File Editor
package kis.sample;
import java.awt.BorderLayout;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
@kishida
kishida / LoomGame
Last active August 1, 2018 21:27
Loom sample with continuation for a game
package kis.loom;
import java.awt.Color;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
/**
* need Project Loom