This file contains 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/utils/math/SafeMath.sol"; | |
interface IERC20 { | |
function totalSupply() external view returns (uint256); | |
function decimals() external view returns (uint8); | |
function symbol() external view returns (string memory); | |
function name() external view returns (string memory); |
This file contains 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.7.0; | |
import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
interface IERC20 { | |
function totalSupply() external view returns (uint256); | |
function decimals() external view returns (uint8); | |
function symbol() external view returns (string memory); | |
function name() external view returns (string memory); |
This file contains 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
-- @USAGE: | |
-- local foo = safe_require('foo') | |
-- if not foo then return end | |
_G.safe_require = function(module_name) | |
local package_exists, module = pcall(require, module_name) | |
if not package_exists then | |
vim.defer_fn(function() | |
vim.schedule(function() | |
vim.notify('Could not load module: ' .. module_name, 'error', { title = 'Module Not Found' }) | |
end) |
This file contains 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
brew install vagrant qemu | |
#Due to dependency errors, we must install vbguest first.. | |
vagrant plugin install vagrant-vbguest | |
vagrant plugin install vagrant-qemu | |
#cd to working dir you like to keep your vagrant files | |
cd ~/VM-and-containers/VagrantMachines/M1-vagrantfiles/ubuntu18-generic-64/ | |
#Create a vagrant file | |
$EDITOR Vagrantfile |
This file contains 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
blueprint: | |
name: Zigbee2MQTT - Tuya 4-Button Scene Switch Fixed | |
description: Automate your Tuya 4-Button Scene Switch via Zigbee2MQTT. | |
domain: automation | |
input: | |
switch: | |
name: Tuya 4-Button Scene Switch | |
description: Tuya 4-Button Scene Switch to use | |
selector: | |
entity: |
This file contains 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
blueprint: | |
name: Zigbee2MQTT - Sonoff SNZB-01 Zigbee Wireless Switch | |
description: Automate your Sonoff SNZB-01 Zigbee Wireless Switch via Zigbee2MQTT. | |
domain: automation | |
input: | |
switch: | |
name: Sonoff SNZB-01 Zigbee Wireless Switch | |
description: Sonoff SNZB-01 Zigbee Wireless Switch to use | |
selector: | |
entity: |