Skip to content

Instantly share code, notes, and snippets.

View HenryNguyen5's full-sized avatar
🎯
Focusing

HenryNguyen5

🎯
Focusing
View GitHub Profile
### Keybase proof
I hereby claim:
* I am henrynguyen5 on github.
* I am henrynguyen5 (https://keybase.io/henrynguyen5) on keybase.
* I have a public key ASCFD3AUPWE5rJFHJhGxWtZ9APU8nB-mMb1VVi4QnE4iBQo
To claim this, I am signing this object:
@HenryNguyen5
HenryNguyen5 / Buffer.json
Created November 5, 2019 22:32
Sample @0x/sol-compiler output
{
"schemaVersion": "2.0.0",
"contractName": "Buffer",
"compilerOutput": {
"abi": [],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582080c8ebc736052bfa447b215594dc1a68de9501ffa3b1aec668f0071216a69acb0029",
"opcodes": "PUSH1 0x4C PUSH1 0x2C PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH1 0x0 BYTE PUSH1 0x73 EQ PUSH1 0x0 DUP2 EQ PUSH1 0x1C JUMPI PUSH1 0x1E JUMP JUMPDEST INVALID JUMPDEST POP ADDRESS PUSH1 0x0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN STOP PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 DUP1 0xc8 0xeb 0xc7 CALLDATASIZE SDIV 0x2b STATICCALL DIFFICULTY PUSH28 0x215594DC1A68DE9501FFA3B1AEC668F0071216A69ACB002900000000 ",
interface WebLNProvider {
getInfo;
sendPayment;
makeInvoice;
signMessage;
verifyMessage;
}
type WebLNMethod = { [k in keyof WebLNProvider]: k };
# If using kittyterm with ssh, make sure to use kitty +kitten ssh to allow for proper tui later on
# You can stuff the below stanza into a bash file and run it all at once
sudo apt-get update -y && sudo apt-get upgrade -y
sudo add-apt-repository -y ppa:graphics-drivers
sudo apt-get update -y
sudo apt-get install -y nvidia-driver-410
sudo apt install -y --no-install-recommends xorg lightdm
sudo systemctl disable lightdm
byobu-enable
# Install ubuntu server edition
# Update server
sudo apt-get -y update && sudo apt-get -y upgrade
# Install AMDGPU-PRO driver
wget --referer=http://support.amd.com https://drivers.amd.com/drivers/linux/amdgpu-pro-18.50-708488-ubuntu-18.04.tar.xz
cd amdgpu-pro-18.50-708488-ubuntu-18.04/
sudo dpkg --add-architecture i386
./amdgpu-pro-install --opencl=legacy -y
@HenryNguyen5
HenryNguyen5 / gist:e4d88596f59738a991da5adc15877f8e
Created April 3, 2018 23:15
alias-resolver for path-alias-resolver package
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const { resolvePath } = require('babel-plugin-module-resolver');
class AliasResolver {
constructor(root, aliases = {}) {
this.aliases = {};
this.rule = /(?:require|import)[^'"]*(?:'|")([^'"]*)(?:'|")/g;
this.parseLine = (line, filePath) => {
const transformedLine = line.replace(this.rule, (substr, moduleId) => {
// console.log('matched ', line);

Keybase proof

I hereby claim:

  • I am henrynguyen5 on github.
  • I am henrynguyen5 (https://keybase.io/henrynguyen5) on keybase.
  • I have a public key ASCuLYXta7t_PIVaBrvQ4wHIf89s_Y5-abOZe_mO8NBJ7go

To claim this, I am signing this object:

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
import React, { Component } from 'react';
import NewTabLink from 'components/ui/NewTabLink';
interface RequiredProps {
conditional: boolean;
conditionalProps: {
[key: string]: any;
};
}
class Node {
currentNodeConfig
currentNetworkConfig;
networkConfigs;
nodeConfigs;
constructor(configs) {
Object.assign(this, ...configs);