Steps to deploy Node.js to VPS using PM2 and Github Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) 2022, Mysten Labs, Inc. | |
| // SPDX-License-Identifier: Apache-2.0 | |
| module nfts::marketplace_nofee { | |
| use sui::tx_context::{Self, TxContext}; | |
| use sui::object::{Self, UID, ID}; | |
| use sui::transfer; | |
| use sui::dynamic_object_field as ofield; | |
| use sui::coin::{Self, Coin}; | |
| use sui::balance::{Self, Balance}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity 0.8.11; | |
| // Note: A facet is a contract used by a diamond. | |
| // Note: This is a contrived example to show how to share internal functions between facets | |
| // Note: It is not an accurate or complete implementation | |
| // This design of sharing internal functions between facets works because remember the diamond proxy holds all the | |
| // data and the facets read and write to the diamond proxy contract storage-- not to their own contract storage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/services.dart'; | |
| /// Format a phone number in format (###) ###-#### | |
| class UsPhoneTextInputFormatter extends TextInputFormatter { | |
| @override | |
| TextEditingValue formatEditUpdate( | |
| TextEditingValue oldValue, | |
| TextEditingValue newValue, | |
| ) { | |
| final int newTextLength = newValue.text.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Copyright 2019 Jochem Brouwer | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.19; | |
| contract ERC20Basic { | |
| string public constant name = "ERC20Basic"; | |
| string public constant symbol = "BSC"; | |
| uint8 public constant decimals = 18; | |
| event Approval(address indexed tokenOwner, address indexed spender, uint tokens); |
I couldn't find a good explanation of each step of signTypedData EIP with examples of inputs and outputs at each step. I wanted this so I could keep track.
Say this is our private key
const privKey = new Buffer(
"c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",
"hex"
);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let isRefreshing = false; | |
| let refreshSubscribers = []; | |
| const instance = axios.create({ | |
| baseURL: Config.API_URL, | |
| }); | |
| instance.interceptors.response.use(response => { | |
| return response; | |
| }, error => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this._panResponder = PanResponder.create({ | |
| // ----------- NEGOTIATION: | |
| // A view can become the touch responder by implementing the correct negotiation methods. | |
| // Should child views be prevented from becoming responder on first touch? | |
| onStartShouldSetPanResponderCapture: (evt, gestureState) => () => { | |
| console.info('onStartShouldSetPanResponderCapture'); | |
| return true; | |
| }, |
NewerOlder
