Skip to content

Instantly share code, notes, and snippets.

View Korilakkuma's full-sized avatar

Tomohiro IKEDA Korilakkuma

View GitHub Profile
@Korilakkuma
Korilakkuma / Audio.as
Last active August 29, 2015 14:14
HTML5 Audio Simulator by ActionScript 3.0
package classes {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.events.IOErrorEvent;
import flash.net.URLRequest;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
@Korilakkuma
Korilakkuma / AnalyserNode.as
Last active August 29, 2015 14:14
Audio Visualizer by ActionScript 3.0
package classes {
import flash.display.Sprite;
import flash.display.Graphics;
import flash.events.TimerEvent;
import flash.geom.Point;
import flash.media.SoundMixer;
import flash.utils.ByteArray;
import flash.utils.Timer;
@Korilakkuma
Korilakkuma / MediaStream.as
Created February 1, 2015 09:50
Class for using Microphone
package classes {
import flash.display.Stage;
import flash.display.Sprite;
import flash.events.StatusEvent;
import flash.events.TimerEvent;
import flash.utils.Timer;
import flash.media.Microphone;
import flash.media.SoundTransform;
import flash.display.Stage;
@Korilakkuma
Korilakkuma / DisplayObjectLoader.as
Created January 29, 2015 12:53
Display Object (SWF) Loader
package classes {
import flash.display.Sprite;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.events.HTTPStatusEvent;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.events.MouseEvent;
@Korilakkuma
Korilakkuma / TextLoader.as
Created January 27, 2015 13:30
General Loader of Text
package classes {
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.events.HTTPStatusEvent;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.events.EventDispatcher;
import flash.net.URLLoaderDataFormat;
import flash.net.URLLoader;
@Korilakkuma
Korilakkuma / ClassLoader.php
Created January 21, 2015 10:49
Read class file automatically
<?php
final class ClassLoader {
private $dirs = [];
public function __construct(array $dirs) {
if (!empty($dirs)) {
$this->dirs = $dirs;
}
@Korilakkuma
Korilakkuma / Model.js
Last active August 29, 2015 14:13
MongoDB Wrapper Class
function Model(mongodb, host, port, database) {
this.mongodb = require(mongodb || 'mongodb');
this.server = new this.mongodb.Server(host, (port || this.mongodb.Connection.DEFAULT_PORT));
this.database = new this.mongodb.Db(database, this.server, {safe : true});
this.collection = ''; // Set by subclass
this.opend = false;
var self = this;
@Korilakkuma
Korilakkuma / x-sound-controller-legacy.js
Last active August 29, 2015 14:13
X Sound legacy controller
$(function() {
(function() {
var image = 'data:image/gif;base64,R0lGODlhzAAMALMOANke2bNms69ar5kMmeBm4N1I3Z4ent9a36QzpKpIqtsz29cM14AAgMwAzP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NDkxMSwgMjAxMy8xMC8yOS0xMTo0NzoxNiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4ODE1RjYyMzY5MkFFMzExODIxODhGNkJGNkEzNDYxRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3N0UwRjBDOUM3QTQxMUUzQjJGN0Y3OUQ4Mjc0RDVGNyIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3N0UwRjBDOEM3QTQxMUUzQjJGN0Y3OUQ4Mjc0RDVGNyIgeG1wOkNyZWF0b3JUb29sPSJBZG9
@Korilakkuma
Korilakkuma / event-bubbling-viewer.html
Last active August 29, 2015 14:11
Event Bubbling Viewer
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Event Bubbling Viewer</title>
<style type="text/css">
* {
margin:0px;
padding:0px;
@Korilakkuma
Korilakkuma / threejs-render-cube.html
Last active August 29, 2015 14:08
Render Cube by Three.js
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>Three.js | WebGL Library</title>
<script type="text/javascript" src="threejs/build/three.min.js"></script>
<script type="text/javascript">
<!--
(function() {
document.addEventListener('DOMContentLoaded', function() {