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
const hre = require("hardhat"); | |
const BATON_CONTRACT_ADDR = "YOUR_BATON_CONTRACT_ADDRESSS"; | |
async function main() { | |
const Batons = await hre.ethers.getContractFactory("Batons"); | |
const batons = await Batons.attach(BATON_CONTRACT_ADDR); | |
console.log("Connected to batons at :", BATON_CONTRACT_ADDR); | |
// Calling read functions consecutively is fine. |
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
import requests | |
import argparse | |
import sys | |
def main(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--spreadsheet_id', type=str, required=True) | |
parser.add_argument('--gid', type=int, required=True) | |
parser.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout) | |
args = parser.parse_args() |
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
-- ~/.config/nvim/lua/config/options.lua | |
-- See also https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file | |
-- | |
-- Options are automatically loaded before lazy.nvim startup | |
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua | |
-- Add any additional options here | |
vim.opt.autochdir = true |
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
-- Copy this file to your ~/.config/nvim/lua/plugins/ | |
-- This file was written by @cddm. See https://www.reddit.com/r/neovim/comments/14c5e6o/how_to_set_up_dartflutter_with_neovim/jojf4z5/ | |
return { | |
{ | |
"neovim/nvim-lspconfig", | |
opts = { | |
servers = { | |
dartls = {}, | |
}, | |
}, |
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
<!-- Update macos/Runner/DebugProfile.entitlements like the following. --> | |
<!-- See https://docs.flutter.dev/platform-integration/macos/building#setting-up-entitlements --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>com.apple.security.app-sandbox</key> | |
<true/> | |
<key>com.apple.security.cs.allow-jit</key> | |
<true/> |
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
#!/usr/bin/env fish | |
# This will allow LazyGit and Ranger to use NeoVim as their editor. | |
set -Ux EDITOR nvim |
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
class ProfileModel extends ChangeNotifier { | |
final Stream<User?> _userStream = FirebaseAuth.instance.authStateChanges(); | |
User? user; | |
Stream<DocumentSnapshot<Profile>>? _profileStream; | |
Profile? profile; | |
ProfileModel() { | |
_userStream.listen((User? newUser) { | |
user = newUser; | |
profile = null; |
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
const ( | |
LevelCritical = slog.Level(12) | |
) | |
// Critical is an example of a user-defined logging function that wraps slog. | |
// The log record contains the source position of the caller of Critical. | |
func Critical(msg string, args ...any) { | |
if !slog.Default().Enabled(context.Background(), LevelCritical) { | |
return | |
} |
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
-- Copy this file to your ~/.config/nvim/lua/plugins/. | |
-- Add $GOPATH/bin to $PATH. For example, `set -Ux GOPATH $HOME/go && fish_add_path $GOPATH/bin` | |
-- Consider using https://github.com/fatih/vim-go instead of go.nvim. | |
return { | |
{ | |
"ray-x/go.nvim", | |
dependencies = { -- optional packages | |
"ray-x/guihua.lua", | |
"neovim/nvim-lspconfig", | |
"nvim-treesitter/nvim-treesitter", |
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
-- Copy this file to your ~/.config/nvim/lua/plugins/ | |
-- See https://github.com/akinsho/flutter-tools.nvim for details. | |
return { | |
{ | |
"akinsho/flutter-tools.nvim", | |
lazy = false, | |
dependencies = { | |
"nvim-lua/plenary.nvim", | |
"stevearc/dressing.nvim", -- optional for vim.ui.select | |
}, |
OlderNewer