Skip to content

Instantly share code, notes, and snippets.

View makevoid's full-sized avatar

Francesco 'makevoid' Canessa makevoid

View GitHub Profile
@makevoid
makevoid / metr-at-video-overlay.css
Last active April 29, 2017 08:38
metr.at VESC logger app - Video Overlay custom HTML/CSS/JS
.hidden{ display: none; }
/* --- */
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
white-space: nowrap;
0x48B7c27868Be4ecb58fFb8dfe98654C48EDaA9aE
0x5F0bc362b192F9305337320FC06D5C540d65114A
import "AssetLedger.sol";
// TODO describe rules of exchange.
// In the AF market all users benefit from a "last look" facility to prevent
// them falling foul of mechanical arb sniping by those exploiting the way
// the blockchain and smart contract data lags the real markets being tracked.
// The system proceeds through a series of batching steps, which in practice
// might correspond to some number of blocks (for example, each batching step
// corresponds to a block). Orders collected in batching step B_i are initially
// in a "pending" state although visible within the book. Orders then remain
@makevoid
makevoid / vesc6-8s5p-single-motor-6374-FOC-config.md
Last active October 25, 2017 03:44
VESC 6 - 8S5P - Single Motor 6374 190KV - FOC - default settings

Single motor 6374 190KV FOC Vesc config (via auto detection) 10S8P li-ion w/ BMS (1y low usage)

I followed the wizard and used the default FOC detection settings, I just modified the current limits (motor/battery) + PPM settings obviously. I haven't changed (played with) any custom FOC setting yet as the default one seem to be good enough.

DATA

Rider Weight ~100kg

Top Speed: 40 km/h (23 mph) when fully charged

pragma solidity ^0.4.8;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/issues/20
contract ERC20Interface {
@makevoid
makevoid / kovan-address.txt
Created July 22, 2017 06:52
kovan-address.txt
0xf9adB4852142fa22D8DE96c7cFcEEe500803f1f1
@makevoid
makevoid / ABToken.sol
Created November 13, 2017 22:28
Applied Blockchain ERC20 Token
pragma solidity ^0.4.8;
contract ABTokenBase {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since public getter functions are not
currently recognised as an implementation of the matching abstract
@makevoid
makevoid / deploy.js
Created November 14, 2017 12:21
Web3 Beta deploy code
#! /usr/bin/env node
const c = console
const Web3 = require('web3')
const {promisify} = require('util')
const web3 = new Web3('ws://localhost:8546') // ws are faster
// const web3 = new Web3('http://localhost:8545') // standard http json rpc
@makevoid
makevoid / run-latest-cmd.applescript
Last active November 21, 2017 10:42
Run the latest command in terminal via Applescript
# focus terminal
tell application "Terminal"
activate
end tell
# up arrow - enter (run last command)
tell application "System Events"
key code 126
key code 36
end tell