Skip to content

Instantly share code, notes, and snippets.

View gwmccubbin's full-sized avatar
🤢
choking on candy

Gregory McCubbin gwmccubbin

🤢
choking on candy
View GitHub Profile
➜ code mkdir my_test_project
➜ code cd my_test_project
➜ my_test_project npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See npm help init for definitive documentation on these fields
and exactly what they do.
Use npm install <pkg> afterwards to install a package and
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
@gwmccubbin
gwmccubbin / Package.json
Created August 23, 2022 16:25
ICO Module Package.json
{
"name": "crowdsale",
"version": "1.0.0",
"description": "",
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"bootstrap": "^5.2.0",
"react": "^18.2.0",
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract HotelRoom {
enum Statuses {
Vacant,
Occupied
}
Statuses public currentStatus;
const Alert = () => {
return (
<div>
<div className="alert alert--remove">
<h1>Transaction Pending...</h1>
</div>
<div className="alert alert--remove">
<h1>Transaction Will Fail</h1>
</div>
<div className="alert alert--remove">
const Transactions = () => {
return (
<div className="component exchange__transactions">
<div>
<div className='component__header flex-between'>
<h2>My Orders</h2>
<div className='tabs'>
<button className='tab tab--active'>Orders</button>
const Trades = () => {
return (
<div className="component exchange__trades">
<div className='component__header flex-between'>
<h2>Trades</h2>
</div>
<table>
<thead>
export const options = {
chart: {
animations: { enabled: true },
toolbar: { show: false },
width: '100px'
},
tooltip: {
enabled: true,
theme: false,
style: {
const Banner = ({ text }) => {
return (
<div className='banner'>
<h1>{text}</h1>
</div>
);
}
export default Banner;
const PriceChart = () => {
return (
<div className="component exchange__chart">
<div className='component__header flex-between'>
<div className='flex'>
<h2></h2>
<div className='flex'>