A bash script to create pull requests for setting up a repo the old Spearbit way
- be sure you have gh installed if you want the script to create PR's (optional)
Mac
import sys | |
import re | |
def convert_to_ts_string(file_path): | |
try: | |
# Read the Markdown file content | |
with open(file_path, 'r', encoding='utf-8') as file: | |
content = file.read() | |
# Escape special characters |
import sys | |
import re | |
def convert_to_markdown(input_path): | |
try: | |
with open(input_path, 'r', encoding='utf-8') as input_file: | |
content = input_file.read() | |
# Replace escaped newlines with actual newlines | |
content = content.replace('\\n', '\n') |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
import { Vm } from "forge-std/Vm.sol"; | |
import {Test, console} from "forge-std/Test.sol"; | |
import {Counter} from "../src/Counter.sol"; | |
interface IERC20 { | |
function balanceOf(address account) external view returns (uint256); | |
function mint(address account, uint256 amount) external; | |
} |
A bash script to create pull requests for setting up a repo the old Spearbit way
Mac
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; | |
import "forge-std/Test.sol"; | |
contract UnrolledLoopTest is Test { | |
function _transfer1(uint256 counter) internal returns (uint256) { | |
// token.transfer(addressList[counter], amount); | |
return counter + 1; | |
} |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; | |
import "forge-std/Test.sol"; | |
contract Utility { | |
error BadCalldata(); | |
error NonPayable(); | |
error Payable(); | |
error NoCode(); |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
import "forge-std/Test.sol"; | |
contract SheHateMe { | |
receive() external payable {} | |
function getImpl(uint8 x) public returns (address) { | |
return address(this); |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; | |
import "forge-std/Test.sol"; | |
contract Reverter { | |
event Test(); | |
function emitAndRevert() external { | |
emit Test(); |
// @author original POC by @z0age | |
library pureConsole { | |
/********************* | |
* string + uint256 | |
********************/ | |
function log(string memory errorMessage, uint256 value) internal pure { |
#!/bin/bash | |
alias c='code .' | |
alias cdh='cd $HOME' | |
alias ls='ls -la' | |
alias sl="ls" | |
alias cls='clear' | |
alias g='git status' | |
alias gap='git add -p' | |
alias gl='git log' |