see the result here : https://rawgit.com/ybootin/6f7b598d9be23982af1c4f887d755314/raw/mamejs.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var github = require('octonode'); | |
var fs = require('fs'); | |
var execsync = require('child_process').execSync; | |
var parse = require('parse-link-header'); | |
var token = "xxxxxxxxxxxxxx" | |
var path = "/Users/xxx/github" | |
var debug = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<style> | |
.json-tree { | |
font-size: 10px; | |
font-family: Monaco; | |
} | |
.json-tree-button { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple webserver to simulate response delay on VAST call | |
var express = require('express'); | |
var app = express(); | |
var fs = require('fs') | |
// CORS | |
app.all('/', function(req, res, next) { | |
res.header("Access-Control-Allow-Origin", "*"); |
#MAME js loader Proof Of Concept
A no dependency simple proof of concept to run MAME in a browser
Test outrun rom here : https://rawgit.com/ybootin/557c2f7f4548107bfe24af6d89fe91d5/raw/af839a36054a5abf51929300cd1d92f2e4279a7e/mame.html
You can compile your own emulator here : https://github.com/mamejs/mamejs-compiler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window) { | |
// http://engineering.shapesecurity.com/2015/01/detecting-phantomjs-based-visitors.html | |
if (/PhantomJS/.test(window.navigator.userAgent)) { | |
var ProgressEvent = function(type, eventInit) { | |
this.type = type | |
this.lengthComputable = eventInit.lengthComputable | |
this.loaded = eventInit.loaded | |
this.total = eventInit.total | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.require_version ">= 1.6.3" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define "boot2docker" | |
config.vm.box = "yungsang/boot2docker" | |
config.vm.box_check_update = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// retrieve all global links, and unlink all | |
// USAGE : | |
// node unlink.js module ==> remove module from node cache | |
// node unlink.js ==> remove all modules from cache | |
var execSync = require('exec-sync'); | |
var readJson = require('read-package-json') | |
var output = execSync('ls -l /usr/local/lib/node_modules | grep "\\\->"') | |
var m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
<style> | |
.checked { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# retrieve from https://github.com/strk/gnash/blob/master/macros/haxe.m4#L53 | |
haxe -help 2>&1| grep -i ^haxe | awk '{print $'3'}' |