Skip to content

Instantly share code, notes, and snippets.

View dglowinski's full-sized avatar

Dariusz Glowinski dglowinski

View GitHub Profile
--allow-root --unsafe-perm=true
#if [ "$TMUX" = "" ]; then tmux; fi
SAVEHIST=1500
HISTFILE=~/.zsh_history
source <(command kubectl completion zsh)
alias pods='kubectl get pods'
alias events='kubectl get events --watch'
@dglowinski
dglowinski / gist:cc4cc0cbfe15ca8e9d815e71dbbd14a6
Created April 23, 2018 12:31
Install HDWalletProvider latest from github
npm install --save-dev git+https://github.com/trufflesuite/truffle-hdwallet-provider.git#71520a2
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind r source-file ~/.tmux.conf
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
Account.aggregate([
{$unwind: {path: "$tokens"}},
{$match:{ "tokens.tokenId": tokenId }},
{$project: {
address: 1,
balance:{
$reduce: {
input: "$tokens.transactions",
initialValue: 0,
in: { $add:["$$value", "$$this.amount" ]}
http://a6defc6f3f20111e7844f068e5716195-1654545296.eu-west-1.elb.amazonaws.com
EUROTOKEN 0x38da57742a216a18b2c7eadbb9e2a973bd911355
FACTORY 0x2db4602c9850ff094db9f471096a2295e0afad93
admin 0x7b27306862374646cf507057be07637a8d9f0e14
{
"editor.fontSize": 14,
"editor.tabSize": 2,
"workbench.activityBar.visible": true,
"workbench.colorTheme": "Monokai",
"git.confirmSync": false,
"editor.fontFamily": " 'Monaco', 'Consolas', 'Inconsolata', 'Courier New', 'Courier'",
"jshint.options": {
"esversion":6,
"asi": true
const axios = require("axios");
const Web3 = require("web3");
const HDWalletProvider = require("truffle-hdwallet-provider");
const conf = require("../app/config/config");
const abiArray = require("../app/oracle/abi/abi.json");
conf.load(config => {
const logger = require("../app/modules/logger");
const mnemonic = config["oracle.mnemonic"];
Migrations
0x99cf980101849af4cac5f0d73c485188b746bf95
Old Contract
0x5f2b6b40ba6c6c597b17f83f50496bda35f170c6
Token
0x3b2b56b4756bbd2bd3e74910e57d86db85246766
NEW EUR
@dglowinski
dglowinski / web3-solc-contract-compile-deploy.js
Created December 15, 2017 11:34 — forked from tomconte/web3-solc-contract-compile-deploy.js
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);