Skip to content

Instantly share code, notes, and snippets.

View stefek99's full-sized avatar
🦄
Rainbows. Lasers. Unicorns.

Michal Stefanow stefek99

🦄
Rainbows. Lasers. Unicorns.
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Metamask + WebSockets + web3.js 1.0.0</title>
<!-- USING THIS VERSION: https://github.com/ethereum/web3.js/blob/1.0/dist/web3.js -->
<script src="lib/web3-v1.0.0-beta.34.js"></script>
<script>
const SuperSimple = artifacts.require('SuperSimple.sol')
contract('SuperSimple', function (accounts) {
let owner = accounts[0]
let bidderA = accounts[1]
let simple;
beforeEach(async function() {
simple = await SuperSimple.new({from: owner});
});
@stefek99
stefek99 / Auction.js
Created June 6, 2018 14:34
Auction contract - getting better at Solidity
/* eslint-disable no-undef */ // Avoid the linter considering truffle elements as undef.
const Auction = artifacts.require('Auction.sol')
const { expectThrow, increaseTime } = require('./helpers')
contract('Auction', function (accounts) {
let owner = accounts[0]
let bidderA = accounts[1]
let bidderB = accounts[2]
let bidderC = accounts[3]
@stefek99
stefek99 / gist:e27924a4a760a45c33e97016874424b2
Created September 20, 2017 14:53
OK to be not OK - recognise weakness - stay in the flow!
Yesterday I was so tired. Didn't get any night sleep. I had a flight at 7am. I was driving from Wales, arrived to the place around 1:30am and I had to vacate it London.
Luton airport is towards Wales and I would make a better decision book a parking (official was £100+ more than a return flight) but it would be possible to find some alternatives.
(EDIT / UPDATE: maybe I wanted to be “stuck” in London - decent reason to go back)
Another uncool thing - the startup ticket for 100 CHF sold out - I tried to hassle to much, get 30% discount by paying in BTC. By the time I got reply they were all gone…
Not ideal logistics, lack of sleep, sold out tickets = not good.
@stefek99
stefek99 / backup-your-wiki.php
Last active June 28, 2017 22:45
Wikimedia - backup your Wiki. I've asked a friend to quickly create a script to backup my wiki... Some hardcoded values and massive, inline CSS :)
<?php
$css=str_replace('//static.miraheze.org/genwiki/0/03/','',base64_decode("PHN0eWxlPg0KLmNsaWVudC1ub2pzICNjYS12ZS1lZGl0LC5jbGllbnQtbm9qcyAubXctZWRpdHNlY3Rpb24tZGl2aWRlciwuY2xpZW50LW5vanMgLm13LWVkaXRzZWN0aW9uLXZpc3VhbGVkaXRvciwudmUtbm90LWF2YWlsYWJsZSAjY2EtdmUtZWRpdCwudmUtbm90LWF2YWlsYWJsZSAubXctZWRpdHNlY3Rpb24tZGl2aWRlciwudmUtbm90LWF2YWlsYWJsZSAubXctZWRpdHNlY3Rpb24tdmlzdWFsZWRpdG9ye2Rpc3BsYXk6bm9uZX0uY2xpZW50LWpzIC5tdy1jb250ZW50LWx0ciAubXctZWRpdHNlY3Rpb24tYnJhY2tldDpmaXJzdC1vZi10eXBlLC5jbGllbnQtanMgLm13LWNvbnRlbnQtcnRsIC5tdy1lZGl0c2VjdGlvbi1icmFja2V0Om5vdCg6Zmlyc3Qtb2YtdHlwZSl7bWFyZ2luLXJpZ2h0OjAuMjVlbTtjb2xvcjojNTU1fS5jbGllbnQtanMgLm13LWNvbnRlbnQtcnRsIC5tdy1lZGl0c2VjdGlvbi1icmFja2V0OmZpcnN0LW9mLXR5cGUsLmNsaWVudC1qcyAubXctY29udGVudC1sdHIgLm13LWVkaXRzZWN0aW9uLWJyYWNrZXQ6bm90KDpmaXJzdC1vZi10eXBlKXttYXJnaW4tbGVmdDowLjI1ZW07Y29sb3I6IzU1NX0uY2xpZW50LWpzLnZlLW5vdC1hdmFpbGFibGUgLm13LWNvbnRlbnQtbHRyIC5tdy1lZGl0c2VjdGlvbi1icmFja2V0LC5jbGllbnQtanMudmUtbm90LWF2YWlsYWJsZSAubXctY29udGVudC1ydGwgLm13LWVkaXRzZWN0aW9uLWJyY
@stefek99
stefek99 / gist:7bda55d61ec0704ad378e29bb84e972d
Created June 28, 2017 22:44
I've asked a friend to quickly create a script to backup my wiki...
<?php
$css=str_replace('//static.miraheze.org/genwiki/0/03/','',base64_decode("PHN0eWxlPg0KLmNsaWVudC1ub2pzICNjYS12ZS1lZGl0LC5jbGllbnQtbm9qcyAubXctZWRpdHNlY3Rpb24tZGl2aWRlciwuY2xpZW50LW5vanMgLm13LWVkaXRzZWN0aW9uLXZpc3VhbGVkaXRvciwudmUtbm90LWF2YWlsYWJsZSAjY2EtdmUtZWRpdCwudmUtbm90LWF2YWlsYWJsZSAubXctZWRpdHNlY3Rpb24tZGl2aWRlciwudmUtbm90LWF2YWlsYWJsZSAubXctZWRpdHNlY3Rpb24tdmlzdWFsZWRpdG9ye2Rpc3BsYXk6bm9uZX0uY2xpZW50LWpzIC5tdy1jb250ZW50LWx0ciAubXctZWRpdHNlY3Rpb24tYnJhY2tldDpmaXJzdC1vZi10eXBlLC5jbGllbnQtanMgLm13LWNvbnRlbnQtcnRsIC5tdy1lZGl0c2VjdGlvbi1icmFja2V0Om5vdCg6Zmlyc3Qtb2YtdHlwZSl7bWFyZ2luLXJpZ2h0OjAuMjVlbTtjb2xvcjojNTU1fS5jbGllbnQtanMgLm13LWNvbnRlbnQtcnRsIC5tdy1lZGl0c2VjdGlvbi1icmFja2V0OmZpcnN0LW9mLXR5cGUsLmNsaWVudC1qcyAubXctY29udGVudC1sdHIgLm13LWVkaXRzZWN0aW9uLWJyYWNrZXQ6bm90KDpmaXJzdC1vZi10eXBlKXttYXJnaW4tbGVmdDowLjI1ZW07Y29sb3I6IzU1NX0uY2xpZW50LWpzLnZlLW5vdC1hdmFpbGFibGUgLm13LWNvbnRlbnQtbHRyIC5tdy1lZGl0c2VjdGlvbi1icmFja2V0LC5jbGllbnQtanMudmUtbm90LWF2YWlsYWJsZSAubXctY29udGVudC1ydGwgLm13LWVkaXRzZWN0aW9uLWJyY
Mac:
```
Michals-MacBook-Pro:testnet zen$ rebar get
==> pink_hash (get-deps)
==> dump (get-deps)
==> trie (get-deps)
==> chalang (get-deps)
==> jiffy (get-deps)
==> cowlib (get-deps)
@stefek99
stefek99 / gist:cb656915806a800646ade8ce87b0ccc9
Created February 22, 2017 07:30
Console output (no pastebin)
Last login: Wed Feb 22 00:01:15 on ttys000
/usr/bin/alias: line 4: builtin: alias: not a shell builtin
Michals-MBP:~ zen$ env
TERM_PROGRAM=iTerm.app
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/2t/qk7l_nt10rg0znh0w60gdn7m0000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.JCAkOljZ3F/Render
TERM_PROGRAM_VERSION=3.0.14
TERM_SESSION_ID=w0t1p0:F03DB28B-54D4-4549-8801-599EDF76EF97
@stefek99
stefek99 / app.html
Created July 21, 2016 15:17 — forked from jdanyow/app.html
Aurelia RequireJS Gist
<template>
<h1>${message}</h1>
</template>
@stefek99
stefek99 / app.html
Created July 11, 2016 15:21 — forked from jdanyow/app.html
Aurelia Validation Demo
<template>
<require from="./registration-form"></require>
<registration-form></registration-form>
</template>