- Terminal ( toggle CTRL + ` )
- Go to file
- Ctrl + click = jump to file from console
- Theme "Material Theme Palenight High Contrast"
- Icons "material-icon-theme"
- Plugin: ESLint
- Switch between projects (CTRL + R)
- Plugin: ES7 React/Redux/GraphQL/React-Native snippets
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
const fs = require('fs'); | |
const path = require('path'); | |
// here i have 10k json files delivered by collection owner | |
const dirPath = '/Users/user/Documents/collection_V1/json'; | |
const updateContent = (filePath, content) => { | |
const match = filePath.match(/(\d+)\.json$/); | |
if (match) { | |
console.log(match[1]); // get tokenId from path |
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.8.15; | |
// SPDX-License-Identifier: MIT | |
contract PaymentSplitter { | |
address payable [] public recipients; | |
event TransferReceived(address _from, uint _amount); | |
constructor(address payable [] memory _addrs) { | |
for(uint i=0; i<_addrs.length; i++){ | |
recipients.push(_addrs[i]); |
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.7; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; | |
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol"; | |
contract NftStaker { | |
IERC1155 public parentNFT; | |
struct Stake { |
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.7; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
library Base64 { | |
string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | |
bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" |
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
// contracts/GameItems.sol | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/utils/Strings.sol"; | |
contract GameItems is ERC1155, Ownable { | |
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.8.7; | |
// SPDX-License-Identifier: MIT | |
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; | |
contract FeeCollector { | |
address public owner; | |
uint256 public balance; | |
event TransferReceived(address _from, uint _amount); |
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.8.7; | |
// SPDX-License-Identifier: MIT | |
contract FeeCollector { // | |
address public owner; | |
uint256 public balance; | |
constructor() { | |
owner = msg.sender; // store information who deployed contract | |
} |
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
{ | |
"window.zoomLevel": 3, | |
"editor.renderWhitespace": "boundary", | |
"editor.tabSize": 2, | |
"workbench.iconTheme": "eq-material-theme-icons-palenight", | |
"editor.rulers": [80], | |
"editor.scrollBeyondLastLine": false, | |
"editor.wrappingIndent": "none", | |
"files.trimTrailingWhitespace": true, | |
"files.insertFinalNewline": true, |
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
# migration script from IPB4 to Discourse | |
require "mysql2" | |
require File.expand_path(File.dirname(__FILE__) + "/base.rb") | |
require 'htmlentities' | |
class ImportScripts::Ipb4 < ImportScripts::Base | |
IPB_DB_USER = "user" | |
IPB_DB_PASSWORD = "password" | |
IPB_4_DB = "mmo_forum" |