Skip to content

Instantly share code, notes, and snippets.

View nand2's full-sized avatar

nand2

  • Annecy, France
View GitHub Profile
@nand2
nand2 / gist:11e02c10fd4699212ff7
Created May 29, 2014 10:09
Update of rig price on Betarigs using its API
<?php
// Config
$base_api_url = "https://www.betarigs.com/api/v1";
$rig_id = 1;
$percent_above_market_price = 10;
$minimum_per_speed_unit_price = 0.001;
$api_key = 'XXX';
echo "[" . date('Y-m-d H:i:s') . "] Launching price updating of rig $rig_id\n";
<?php
// Config
$base_api_url = "https://www.betarigs.com/api/v1";
$rig_id = 4737;
echo "[" . date('Y-m-d H:i:s') . "] Getting infos about rig $rig_id ...\n";
$url = $base_api_url . '/rig/' . $rig_id;
<?php
// Config
$base_api_url = "https://www.betarigs.com/api/v1";
$rig_id = 1;
$percent_above_market_price = 10;
$minimum_per_speed_unit_price = 0.001;
$api_key = 'XXX';
echo "[" . date('Y-m-d H:i:s') . "] Launching price updating of rig $rig_id\n";
@nand2
nand2 / gist:11cdac05085ad652ef10
Created May 29, 2014 11:38
Update of rig price on Betarigs using its API
<?php
// Config
$base_api_url = "https://www.betarigs.com/api/v1";
$rig_id = 1;
$percent_above_market_price = 10;
$minimum_per_speed_unit_price = 0.001;
$api_key = 'XXX';
echo "[" . date('Y-m-d H:i:s') . "] Launching price updating of rig $rig_id\n";
function computeRemainingTime(ratio_updated) {
var averageBlockTime = 12;
var blockGasIncrease = (20-3)/2; // Gross average of gas increase
var requiredGasLimit = 21000;
var currentGasLimit = eth.getBlock("latest").gasLimit;
var GasLimitDelta = requiredGasLimit - currentGasLimit;
var increasingBlockRatio = (ratio_updated - (1 - ratio_updated));
var necessaryBlocks = (GasLimitDelta / increasingBlockRatio) / blockGasIncrease;
var necessaryTime = necessaryBlocks * averageBlockTime;
As an editor i would like to be able to manually input match results and have them show up styled as results.
The editor should be able to
attach result bar
Input teams: country/club
attach image/log to the teams
Mark it with time/live/finished
input the current goal standing
Input time and name of goal scorers under a team

Dyndrop Challenge

Ce challenge tournera autour du PaaS open source CloudFoundry.

Installation de Cloudfoundry

Avant toute chose, je vous conseille d'installer direct CloudFoundry sur une VM, en suivant les instructions sur: https://github.com/cloudfoundry/vcap/ -- C'est long! Ubuntu server 10.04 est necessaire.

Dyndrop Challenge

Ce challenge tournera autour du PaaS open source CloudFoundry.

Installation de Cloudfoundry

Avant toute chose, je vous conseille d'installer direct CloudFoundry sur une VM, en suivant les instructions sur: https://github.com/cloudfoundry/vcap/ -- C'est long! Ubuntu server 10.04 est necessaire.

Dyndrop Challenge

Ce challenge tournera autour du PaaS open source CloudFoundry.

Installation de Cloudfoundry

Avant toute chose, je vous conseille d'installer direct CloudFoundry sur une VM, en suivant les instructions sur: https://github.com/cloudfoundry/vcap/ -- C'est long! Ubuntu server 10.04 est necessaire.