Skip to content

Instantly share code, notes, and snippets.

@shinaisan
shinaisan / index.html
Created August 11, 2012 05:13
My first trial of Twitter Bootstrap.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<title>Twitter Bootstrap Test</title>
<link rel="stylesheet" style="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"></link>
<style type="text/css">
body {
padding-top: 90px;
}
@shinaisan
shinaisan / magic.html
Created August 13, 2012 13:47
Magic number checker for Java class files (CAFEBABE) using drag&drop and ArrayBuffer.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Magic Number Checker: CAFEBABE</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src='magic.js'></script>
<style type='text/css'>
@shinaisan
shinaisan / test.rb
Created August 20, 2012 22:46
A short sample of BinData Ruby gem to pp a constant pool of a Java class file.
require 'bindata'
require 'pp'
class ConstantClassInfo < BinData::Record
uint16be :name_index
end
class ConstantFieldrefInfo < BinData::Record
uint16be :class_index
uint16be :name_and_type_index
@shinaisan
shinaisan / test.rb
Created August 25, 2012 02:16
Sample: Reading the end of central directory record using BinData Ruby gem.
require 'bindata'
require 'pp'
class ZipEndHeader < BinData::Record
uint32be :signature, :check_value => 0x504b0506
uint16le :number_of_disks
uint16le :disk_number_start
uint16le :number_of_disk_entries
uint16le :number_of_entries
uint32le :central_dir_size
@shinaisan
shinaisan / index.html
Created August 30, 2012 14:54
Processing.js sample: ArrayList
<html>
<head>
<title>Processing.js Test</title>
<script type="text/javascript" src="processing.js"></script>
</head>
<body>
<h1>Processing.js Test</h1>
<script type="application/processing" src="test.processing"></script><canvas></canvas>
<br/>
</body>
@shinaisan
shinaisan / index.html
Created September 1, 2012 00:38
Orbit of the quadratic recurrence equation z^2+c drawn with Processing.js
<html>
<head>
<title>Processing.js Test</title>
<script type="text/javascript" src="processing.js"></script>
</head>
<body>
<h1>Processing.js Test</h1>
<script type="application/processing" src="test.processing"></script><canvas></canvas>
<br/>
</body>
@shinaisan
shinaisan / index.html
Created September 1, 2012 14:26
Orbit of the quadratic recurrence equation z^2+c drawn using Processing.js
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Processing.js Test</title>
<script type="text/javascript" src="processing.js"></script>
</head>
<body>
<h1>Processing.js Test</h1>
<script type="application/processing" src="test.processing"></script><canvas></canvas>
<br/>
@shinaisan
shinaisan / index.html
Created September 1, 2012 15:31
Orbit of the quadratic recurrence equation z^2+c drawn using Processing.js (grid added)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Processing.js Test</title>
<script type="text/javascript" src="processing.js"></script>
</head>
<body>
<h1>Processing.js Test</h1>
<script type="application/processing" src="test.processing"></script><canvas></canvas>
<br/>
@shinaisan
shinaisan / index.html
Created October 4, 2012 14:48
Reduced sample of force directed static graph using Javascript InfoVis Toolkit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Test</title>
<link rel="stylesheet" type="text/css" href="test.css"/>
<script type='text/javascript' src='jit.js'></script>
<script type='text/javascript' src='test.js'></script>
</head>
@shinaisan
shinaisan / index.html
Created October 13, 2012 13:13
Sample of Javascript InfoVis Toolkit for drawing complete graphs with the ability to change shape of edges by dragging.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Test</title>
<link rel="stylesheet" type="text/css" href="test.css"/>
<script type='text/javascript' src='jit.js'></script>
<script type='text/javascript' src='test.js'></script>
</head>