Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am adamgall on github.
  • I am trainface (https://keybase.io/trainface) on keybase.
  • I have a public key ASBzRBcPcCns_5UtW0cgk0qoJCULUuC5GLVYGal5DyltvQo

To claim this, I am signing this object:

@adamgall
adamgall / SimpleSafe.sol
Last active August 12, 2023 18:46
SimpleSafe: a bare-minimum 1-of-1 "multisig" contract with a rotatable owner. Inspired by @0xfoobar.
// SPDX-License-Identifier: Unlicense
pragma solidity 0.8.21;
contract SimpleSafe {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
@adamgall
adamgall / attestation.txt
Created April 7, 2022 22:57
Attestation
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore16
Contributor # 200
Hash: abc5a2a7 61995744 9685d513 cf71ad65
a30eaf1d e45bdc25 87edae9c 71d2413b
1220c1ca 8752e421 d8a28ffa 8f967727
63183dd7 637ccf60 716ef707 6f100745
@adamgall
adamgall / express-response-flow.js
Created June 10, 2019 23:00
i don't understand promises
export const register = (req, res) => {
const newUser = new User(res.locals.db)({
name: req.body.name,
email: req.body.email,
password: req.body.password
});
User(res.locals.db)
.findOne({ email: newUser.email })
.then(checkDuplicateUser(res))
Verifying my Blockstack ID is secured with the address 14x3j7Cvye7usFNUwPhHVRp7dHKDevtvTo https://explorer.blockstack.org/address/14x3j7Cvye7usFNUwPhHVRp7dHKDevtvTo
const BigNumber = require('bignumber.js');
const fs = require('fs');
const fastCsv = require('fast-csv');
const web3utils = require('web3-utils');
function drop(instance, filePath) {
return prepareTransfers(filePath)
.then(transfers => checkBalances(instance, transfers))
.then(transfers => filterAccounts(transfers))
.then(transfers => makeTransactions(instance, transfers))
049af98c5d8f183ae990a34c550d0ee71597203ae4a274e6d7f1744d49886fa3ee3d3f6c2fd9aceb7a56e354f2ab1aaf7d374c9823825cd1b656abee72160662b6;BrandonShega

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@adamgall
adamgall / pipeDreams
Created May 7, 2014 18:07
what I want
(
{
morningEvent = YES;
eveningEvent = YES;
startDay = "2014-05-27 04:00:00 +0000";
},
{
morningEvent = NO;
eveningEvent = YES;
startDay = "2014-05-28 04:00:00 +0000";
@adamgall
adamgall / entityObject
Last active August 29, 2015 14:01
Entity
{
startDay: 2014-05-17 00:00:00.000,
startDateTime: 2014-05-17 08:30:00.000
},
{
startDay: 2014-05-17 00:00:00.000,
startDateTime: 2014-05-17 17:00:00.000
},
{
startDay: 2014-05-18 00:00:00.000,