Skip to content

Instantly share code, notes, and snippets.

View maypo's full-sized avatar

mark pitman maypo

View GitHub Profile
const oneEth = ethers.utils.parseEther("1.0");
const ethForAll = async (accounts) => {
await accounts.forEach(async account => {
const balance = await provider.getBalance(account);
//under 1 gets 1
if (balance.lt(oneEth)) {
const sendTx = await oprahSigner.sendTransaction({ to: account, value: oneEth})
assert.isNotNull(sendTx)
@maypo
maypo / HelloWorld.scala
Created July 1, 2018 19:08
good old 'hello world" in scala
object HelloWorld {
def main(args: Array[String]) {
println("Hello, world!")
}
}
localhost ~ # emerge -av dev-lang/scala-bin
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] dev-lang/scala-bin-2.12.4::java-kit USE="-doc" 19,280 KiB
Total: 1 package (1 new), Size of downloads: 19,280 KiB
Would you like to merge these packages? [Yes/No] yes
{
"name": "DemoPoA",
"engine": {
"authorityRound": {
"params": {
"gasLimitBoundDivisor": "0x400",
"stepDuration": "5",
"validators" : {
"list": [
"0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
@maypo
maypo / settings.json
Created November 16, 2016 21:27
file needed for focallocal development
{
"public": {
"google_api_key": "abcdefghijklmnopqrstuvwxyz",
"google": {
"oauth_key": "abcdefghijklmnopqrstuvwxyz",
"oauth_secret": "abcdefghijklmnopqrstuvwxyz"
},
"meetup": {
"oauth_key": "abcdefghijklmnopqrstuvwxyz",
"oauth_secret": "abcdefghijklmnopqrstuvwxyz"
@maypo
maypo / snippets.cson
Created December 12, 2016 15:38
react snippets
'.source.js':
'React es6 class':
'prefix': '_re6c'
'body': """
import React from \'react\';
export default class ${1:XXX} extends React.Component {
constructor(props) {
super(props);
}
@maypo
maypo / keybase.md
Created November 27, 2016 00:20
keybase proof

Keybase proof

I hereby claim:

  • I am maypo on github.
  • I am maypo (https://keybase.io/maypo) on keybase.
  • I have a public key ASBXP5v8KO5y_aNbIYq1Qex_Ie6x6AM_26vxTOJ29XLxOgo

To claim this, I am signing this object:

@maypo
maypo / message-test.js
Created October 24, 2016 23:56
message test
/* eslint-disable */
import { Meteor } from 'meteor/meteor';
import React from 'react';
import { shallow } from 'enzyme';
import { chai, assert } from 'meteor/practicalmeteor:chai';
import Message from './Message';
describe('Message component', () => {
@maypo
maypo / message.jsx
Created October 24, 2016 23:54
message stateless component
import React from 'react';
const Message = ({ title, subtitle }) => (
<div className="message-wrapper">
{title ? <div className="title-message">{title}</div> : null}
{subtitle ? <div className="subtitle-message">{subtitle}</div> : null}
</div>
);
Message.propTypes = {