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
| # First, follow the installation steps here: https://chriskalos.notion.site/The-0-Home-Server-Written-Guide-5d5ff30f9bdd4dfbb9ce68f0d914f1f6#21db7c9525b046aaade33d538e197175 | |
| # I will not be following the static-IP section in the post, since I will be using Tailscale instead | |
| # To run this Gist: | |
| # curl -sSL https://gist.github.com/kien-ngo/497238acc157ae76c11107ab46c2fd63/raw | bash | |
| ##### Script execution starts ##### | |
| #Start ssh immediately so you can SSH in from another machine with GUI and web browsers so that you can copy stuff more easily | |
| sudo systemctl start ssh | |
| # Start SSH on boot |
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
| #!/bin/bash | |
| # Function to display usage information | |
| usage() { | |
| echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]" | |
| exit 1 | |
| } | |
| # Check if at least one argument (input file) is provided | |
| if [ $# -lt 1 ]; then |
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 { client } from "@/components/client"; | |
| import { | |
| encode, | |
| getContract, | |
| prepareContractCall, | |
| sendAndConfirmTransaction, | |
| } from "thirdweb"; | |
| import { avalancheFuji } from "thirdweb/chains"; | |
| import { aggregate3 } from "thirdweb/extensions/multicall3"; | |
| import { privateKeyToAccount } from "thirdweb/wallets"; |
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
| export type GetERC1155sParams = { | |
| /** | |
| * Which tokenId to start at. | |
| */ | |
| start?: number; | |
| /** | |
| * The number of NFTs to retrieve. Defaults to 100 | |
| */ | |
| count?: number; | |
| /** |
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 { | |
| ADDRESS_ZERO, | |
| type NFT, | |
| type BaseTransactionOptions, | |
| type Hex, | |
| } from "thirdweb"; | |
| import { getOwnedTokenIds, isERC721 } from "thirdweb/extensions/erc721"; | |
| export type GetERC721sParams = { | |
| owner: string; |
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.17; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol"; | |
| contract USDCPolygonReceiver { | |
| SafeERC20 public token; // Syntax is wrong here | |
| // This is the USDC contract address on Polygon, hard-coded | |
| address public usdcContractAddress = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174; |
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.17; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol"; | |
| contract USDCPolygonReceiver { | |
| SafeERC20 public token; // Syntax is wrong here?! | |
| // This is the USDC contract address on Polygon, hard-coded | |
| address public usdcContractAddress = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174; |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; |