Merge branch 'master' of https://github.com/matiu/mystery
This commit is contained in:
commit
a2cd8d0605
|
@ -7,4 +7,4 @@ mystery
|
||||||
There is a bitcoind configuration sample at:
|
There is a bitcoind configuration sample at:
|
||||||
```
|
```
|
||||||
etc/mystery/bitcoin.conf
|
etc/mystery/bitcoin.conf
|
||||||
```:
|
```
|
||||||
|
|
|
@ -2,5 +2,30 @@
|
||||||
.container
|
.container
|
||||||
p.text-muted Place sticky footer content here.
|
p.text-muted Place sticky footer content here.
|
||||||
|
|
||||||
script(type='text/javascript', src='/lib/jquery/jquery.min.js')
|
//script(type='text/javascript', src='/lib/jquery/jquery.min.js')
|
||||||
script(type='text/javascript', src='/lib/bootstrap/dist/js/bootstrap.min.js')
|
//script(type='text/javascript', src='/lib/bootstrap/dist/js/bootstrap.min.js')
|
||||||
|
|
||||||
|
//AngularJS
|
||||||
|
script(type='text/javascript', src='/lib/angular/angular.js')
|
||||||
|
script(type='text/javascript', src='/lib/angular-cookies/angular-cookies.js')
|
||||||
|
script(type='text/javascript', src='/lib/angular-resource/angular-resource.js')
|
||||||
|
script(type='text/javascript', src='/lib/angular-route/angular-route.js')
|
||||||
|
|
||||||
|
//Angular UI
|
||||||
|
script(type='text/javascript', src='/lib/angular-bootstrap/ui-bootstrap.js')
|
||||||
|
script(type='text/javascript', src='/lib/angular-bootstrap/ui-bootstrap-tpls.js')
|
||||||
|
script(type='text/javascript', src='/lib/angular-ui-utils/ui-utils.js')
|
||||||
|
|
||||||
|
//Application Init
|
||||||
|
script(type='text/javascript', src='/js/app.js')
|
||||||
|
script(type='text/javascript', src='/js/config.js')
|
||||||
|
script(type='text/javascript', src='/js/directives.js')
|
||||||
|
script(type='text/javascript', src='/js/filters.js')
|
||||||
|
|
||||||
|
//Application Services
|
||||||
|
script(type='text/javascript', src='/js/services/global.js')
|
||||||
|
|
||||||
|
//Application Controllers
|
||||||
|
script(type='text/javascript', src='/js/controllers/index.js')
|
||||||
|
script(type='text/javascript', src='/js/controllers/header.js')
|
||||||
|
script(type='text/javascript', src='/js/init.js')
|
||||||
|
|
|
@ -1,17 +1 @@
|
||||||
.navbar.navbar-default.navbar-fixed-top(role='navigation')
|
.navbar.navbar-default.navbar-fixed-top(data-ng-include="'views/header.html'", role='navigation')
|
||||||
.container
|
|
||||||
.navbar-header
|
|
||||||
button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
|
|
||||||
span.sr-only Toggle navigation
|
|
||||||
span.icon-bar
|
|
||||||
span.icon-bar
|
|
||||||
span.icon-bar
|
|
||||||
a.navbar-brand(href='#') Mystery
|
|
||||||
.collapse.navbar-collapse
|
|
||||||
ul.nav.navbar-nav
|
|
||||||
li.active
|
|
||||||
a(href='#') Home
|
|
||||||
li
|
|
||||||
a(href='#about') About
|
|
||||||
li
|
|
||||||
a(href='#contact') Contact
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
extends layouts/default
|
extends layouts/default
|
||||||
|
|
||||||
block content
|
block content
|
||||||
.page-header
|
section.container(data-ng-view)
|
||||||
h1 Hello BitPay!
|
|
||||||
|
section.container
|
||||||
p ˈmɪst(ə)ri/'
|
p ˈmɪst(ə)ri/'
|
||||||
| noun
|
| noun
|
||||||
audio(src="https://ssl.gstatic.com/dictionary/static/sounds/de/0/mystery.mp3",preload="auto",data-dobid="aud",id="aud")
|
audio(src="https://ssl.gstatic.com/dictionary/static/sounds/de/0/mystery.mp3",preload="auto",data-dobid="aud",id="aud")
|
||||||
|
|
|
@ -4,6 +4,5 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
||||||
body
|
body
|
||||||
#wrap
|
#wrap
|
||||||
include ../includes/navbar
|
include ../includes/navbar
|
||||||
section.container
|
|
||||||
block content
|
block content
|
||||||
include ../includes/foot
|
include ../includes/foot
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
"name": "Mystery",
|
"name": "Mystery",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "3.0.3"
|
"angular": "latest",
|
||||||
|
"angular-resource": "latest",
|
||||||
|
"angular-cookies": "latest",
|
||||||
|
"angular-mocks": "latest",
|
||||||
|
"angular-route": "latest",
|
||||||
|
"bootstrap": "3.0.3",
|
||||||
|
"angular-bootstrap": "0.9.0",
|
||||||
|
"angular-ui-utils": "0.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,12 @@
|
||||||
rpcuser=mystery
|
rpcuser=mystery
|
||||||
rpcpassword=real_mystery
|
rpcpassword=real_mystery
|
||||||
server=1
|
server=1
|
||||||
rpcallowip=127.0.0.1
|
|
||||||
rpcport=8332
|
rpcport=8332
|
||||||
testnet=1
|
testnet=3
|
||||||
txindex=1
|
txindex=1
|
||||||
|
|
||||||
|
# Allow connections outsite localhost?
|
||||||
|
# rpcallowip=192.168.0.*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module('mystery', ['ngCookies', 'ngResource', 'ngRoute', 'ui.bootstrap', 'ui.route', 'mystery.system']);
|
||||||
|
|
||||||
|
angular.module('mystery.system', []);
|
|
@ -0,0 +1,21 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
//Setting up route
|
||||||
|
angular.module('mystery').config(['$routeProvider',
|
||||||
|
function($routeProvider) {
|
||||||
|
$routeProvider.
|
||||||
|
when('/', {
|
||||||
|
templateUrl: 'views/index.html'
|
||||||
|
}).
|
||||||
|
otherwise({
|
||||||
|
redirectTo: '/'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
//Setting HTML5 Location Mode
|
||||||
|
angular.module('mystery').config(['$locationProvider',
|
||||||
|
function($locationProvider) {
|
||||||
|
$locationProvider.hashPrefix('!');
|
||||||
|
}
|
||||||
|
]);
|
|
@ -0,0 +1,15 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module('mystery.system').controller('HeaderController', ['$scope', 'Global', function ($scope, Global) {
|
||||||
|
$scope.global = Global;
|
||||||
|
|
||||||
|
$scope.menu = [{
|
||||||
|
'title': 'Articles',
|
||||||
|
'link': 'articles'
|
||||||
|
}, {
|
||||||
|
'title': 'Create New Article',
|
||||||
|
'link': 'articles/create'
|
||||||
|
}];
|
||||||
|
|
||||||
|
$scope.isCollapsed = false;
|
||||||
|
}]);
|
|
@ -0,0 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module('mystery.system').controller('IndexController', ['$scope', 'Global', function ($scope, Global) {
|
||||||
|
$scope.global = Global;
|
||||||
|
}]);
|
|
@ -0,0 +1 @@
|
||||||
|
'use strict';
|
|
@ -0,0 +1 @@
|
||||||
|
'use strict';
|
|
@ -0,0 +1,9 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.element(document).ready(function() {
|
||||||
|
//Fixing facebook bug with redirect
|
||||||
|
if (window.location.hash === '#_=_') window.location.hash = '#!';
|
||||||
|
|
||||||
|
//Then init the app
|
||||||
|
angular.bootstrap(document, ['mystery']);
|
||||||
|
});
|
|
@ -0,0 +1,14 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
//Global service for global variables
|
||||||
|
angular.module('mystery.system').factory('Global', [
|
||||||
|
function() {
|
||||||
|
var _this = this;
|
||||||
|
_this._data = {
|
||||||
|
user: window.user,
|
||||||
|
authenticated: !! window.user
|
||||||
|
};
|
||||||
|
|
||||||
|
return _this._data;
|
||||||
|
}
|
||||||
|
]);
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="container" data-ng-controller="HeaderController">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand" href="#">Mystery</a>
|
||||||
|
</div>
|
||||||
|
<div class="collapse navbar-collapse">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="active"><a href="#">Home</a></li>
|
||||||
|
<li><a href="#about">About</a></li>
|
||||||
|
<li><a href="#contact">Contact</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<section data-ng-controller="IndexController">
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>Hello BitPay!</h1>
|
||||||
|
</div>
|
||||||
|
</section>
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var RpcClient = require('../node_modules/bitcore/RpcClient').class();
|
||||||
|
|
||||||
|
|
||||||
|
var block_hash = process.argv[2] || '0000000000b6288775bbd326bedf324ca8717a15191da58391535408205aada4';
|
||||||
|
|
||||||
|
var rpc = new RpcClient({
|
||||||
|
user: 'mystery',
|
||||||
|
pass: 'real_mystery',
|
||||||
|
protocol: 'http',
|
||||||
|
});
|
||||||
|
|
||||||
|
var block = rpc.getBlock(block_hash, function(err, block) {
|
||||||
|
|
||||||
|
console.log("Err:");
|
||||||
|
console.log(err);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("Block info:");
|
||||||
|
console.log(block);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue