Skip to content

Instantly share code, notes, and snippets.

Avatar
☠️

Alexander Thomas cawfree

☠️
View GitHub Profile
View useGnosisWithdraw.ts
import { useCallback } from "react";
import EIP712Domain from "eth-typed-data";
import BigNumber from "bignumber.js";
import { SimpleSigner } from "did-jwt";
import { ethers } from "ethers";
const { utils } = ethers;
import { useGnosisApi, useGnosisEstimateTransaction } from "../../session";
View useGnosisWithdraw.ts
import { useCallback } from "react";
import EIP712Domain from "eth-typed-data";
import BigNumber from "bignumber.js";
import { SimpleSigner } from "did-jwt";
import { ethers } from "ethers";
const { utils } = ethers;
import { useGnosisApi, useGnosisEstimateTransaction } from "../../session";
@cawfree
cawfree / GnosisSafe.tsx
Created Aug 25, 2020
Failed signature generation for Gnosis Safe (Snippet)
View GnosisSafe.tsx
import EIP712Domain from "eth-typed-data";
import { SimpleSigner } from "did-jwt";
import { ethers } from "ethers";
import {
useGnosisApi,
useIsGnosisSafeDeployed,
useGnosisEstimateTransaction,
} from "../../session";
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@cawfree
cawfree / linear.svg
Last active Mar 2, 2020
Linear Gradient SVG
View linear.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View autogist.md

======== 12:34 ======== = 💻 [tfjs, react] = = 0 Pending Issues = = 📉 btc, 🎧 gdq = ==============autogist=

@cawfree
cawfree / from-powerwash-to-react-native.md
Last active Jul 8, 2019
From Powerwash to React Native
View from-powerwash-to-react-native.md

From Powerwash to React Native

I seem to end up powerwashing my Chromebook all of the time, to the extent that the process of regaining my full development environment in under an hour has become as minimal as I intend to make it.

Since I feel that I've gone as far as I can, I figured documenting the steps involved might be of some value to you. I've tried this on a number of different Chromebooks, so you shouldn't hit any major stumbling blocks*. However, if you do, feel free to tweet me @cawfree.

*arm-v7

So, here's the no deep sh*t guide on how to make your Chromebook React Native ready.

From scratch.

@cawfree
cawfree / case.js
Last active Dec 3, 2020
Convert between Camel Case (camelCase) and Snake Case (snake_case) in ES6
View case.js
export const toCamelCase = (e) => {
return e.replace(/_([a-z])/g, (g) => g[1].toUpperCase());
};
export const toSnakeCase = (e) => {
return e.match(/([A-Z])/g).reduce(
(str, c) => str.replace(new RegExp(c), '_' + c.toLowerCase()),
e
)
.substring((e.slice(0, 1).match(/([A-Z])/g)) ? 1 : 0);
@cawfree
cawfree / jovo_google_action_permission.js
Last active Nov 18, 2017
An example permissions request for Jovo.
View jovo_google_action_permission.js
import { SpeechBuilder } from 'jovo-framework/lib/platforms/speechBuilder';
import { jovo } from 'jovo-framework/lib/jovo';
/**
* agent: /intGetNamePermission
* inputContext: <none>
* userStateIn: <none>
* action: ask for the user's name.
* userStateOut: <none>
* outputContext: <none>
*/
View gist:528159dbb8526e83ab15947d0c692bf2
/**
* Created by Alexander Thomas (@Cawfree) on 06/03/2017.
* This class is used to benchmark base functionality with the connected device we'll be using for testing.
*/
// Run using JUnit4.
@RunWith(AndroidJUnit4.class)
public class InitializeTest {
/** Test whether we have access to the base application context. */
You can’t perform that action at this time.