Skip to content

Instantly share code, notes, and snippets.

@Alex-Werner
Alex-Werner / gist:10981495
Last active August 29, 2015 13:59
Wall ? Why ?
J'ai mal lu la question posé sur Reddit, mais au cas ou un autre repose la quesiton, à réutiliser à ce moment la.
----
There are so many reason explaining that.
Some people do that for, well, not manipulation, but like suggestion.
Imagine, price is at 510. You set a buy order of 10 000BTC @500.
Then price will likely go up, because imagine now a guy who want to sell @510, he see the big wall order, he can think (predict ? Mistake ?) that price won't go under 500. So he will hold and may be buy (when at the first time he wanted to sell).
@Alex-Werner
Alex-Werner / debug.html
Created December 26, 2015 10:57
ChainedPromise Angular
<!--https://github.com/mohsen1/json-formatter -->
<link href="scripts/vendor/json-formatter.min.css" rel="stylesheet" type="text/css">
<div class="container">
<div class="jumbotron">
<h1>Test interface</h1>
<p>Total progression :
<div id="totalProgression" class="progress"></div>
<button type="button" class="btn btn-lg btn-danger" ng-click="runAllTest()">Run All</button>
//Hapi JS use his own cypher algorithm
//see here : https://github.com/hueniverse/iron
handler:funcition(request, reply){
var ssid = req.headers['cookie'].split('session=')[1];
var sidPassword = request.connection.states.cookies.session.password
Iron.unseal(ssid,,Iron.defaults, function (err, unsealed) {
console.log(unsealed);
});
}
function parseCookies(cookie) {
return cookie.split(';').reduce(
function(prev, curr) {
var m = / *([^=]+)=(.*)/.exec(curr);
var key = m[1];
var value = decodeURIComponent(m[2]);
prev[key] = value;
return prev;
},
{ }

Keybase proof

I hereby claim:

  • I am Alex-Werner on github.
  • I am awerner (https://keybase.io/awerner) on keybase.
  • I have a public key whose fingerprint is 2193 DFAD D4AA B54D B23F 341C B7CF 5A35 5467 C1B2

To claim this, I am signing this object:

@Alex-Werner
Alex-Werner / high-dpi-media.css
Created November 16, 2016 17:38 — forked from wylieconlon/high-dpi-media.css
A CSS media query that captures almost all high DPI aware devices.
/* -------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs with IE zoomed in */
/* - Android hdpi devices and above */
/* - Android tvdpi devices, including Google Nexus 7 */
@Alex-Werner
Alex-Werner / common-media-queries.css
Created November 17, 2016 16:45
Common Media Queries
/* This is a small sampling of the various approaches to media queries. The
point is: they're all over the board. Part of the "issue" (if you can call
it that) may be due to the intended audience of each site/framework. Another
may be that it's really difficult to test for a lot of different devices.
Regardless, it would be really nice if there was standard baseline that
could be used as a starting point for maximum compatibility and coverage. */
/* ==========================================================================
Frameworks
========================================================================== */
'use strict';
// import blockchain parameters for Dash
var params = require('webcoin-dash').blockchain
var levelup = require('levelup');
// create a LevelUp database where the block data should be stored
var db = levelup('dash.chain', { db: require('memdown') })
var DBH = require('dash-blockchain-helpers');
var dbh = new DBH({
@Alex-Werner
Alex-Werner / shell
Created July 14, 2017 21:09
Bitcore-node-dash install
sudo apt-get install -y -q \
build-essential \
curl \
git \
libzmq3-dev \
python2.7 \
apt-get update \
&& apt-get install -y -q software-properties-common \
&& add-apt-repository ppa:bitcoin/bitcoin \
@Alex-Werner
Alex-Werner / gist:00ce1086213395004db355653dde2953
Created July 18, 2017 18:35
How to calculate Dash network hashrate
You will need :
Actual diff (find it here http://insight.dash.org/insight/status).
Expected number of block per day (576 : 1blk every 2.5min. 1440min / 2.5).
Real number of block found that day.
Algo is : D*2**32/150, or also other term : BlkFound/BlkExpected*Diff*2**32/150.
With exemple as of data today :