Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

@matrix-compute
matrix-compute / .zshrc
Created August 16, 2024 09:32 — forked from callumlocke/.zshrc
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
@matrix-compute
matrix-compute / .zshrc
Created August 16, 2024 09:32 — forked from callumlocke/.zshrc
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
import vertexai
from vertexai.generative_models import GenerativeModel, ChatSession
vertexai.init(project=project, location=location)
model = GenerativeModel("gemini-1.5-pro-preview-0409")
chat = model.start_chat()
def get_chat_response(chat: ChatSession, prompt: str) -> str:
text_response = []
responses = chat.send_message(prompt, stream=True)
@matrix-compute
matrix-compute / praxisFACTORY.sol
Created March 25, 2024 02:20 — forked from proxima424/praxisFACTORY.sol
Praxis ETHIndia Factory contract
// TESTNET
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
/// @title praxisFACTORY
/// @author @proxima424 <https://github.com/proxima424>
/// @notice Main ser-facing entrypoint contract the interface calls for every feature
/// @notice I believe on using more cross-contract calls, extensive helper functions for better readability
@matrix-compute
matrix-compute / index.pug
Created March 11, 2024 10:12
Pure CSS gravity button (no Firefox yet)
input#slow(type='checkbox')
label(for='slow') slow motion
button chocolate coated gingerbread
span.wrap(aria-hidden='true')
span.particle(style=`--a: -45deg; --x: 53%; --y: 15%; --d: 4em; --f: .7; --t: .15`)
span.particle(style=`--a: 150deg; --x: 40%; --y: 70%; --d: 7.5em; --f: .8; --t: .08`)
span.particle(style=`--a: 10deg; --x: 90%; --y: 65%; --d: 7em; --f: .6; --t: .25`)
span.particle(style=`--a: -120deg; --x: 15%; --y: 10%; --d: 4em`)
span.particle(style=`--a: -175deg; --x: 10%; --y: 25%; --d: 5.25em; --f: .6; --t: .32`)

title: Navigate to a new screen and back title: 导航到一个新页面和返回 description: How to navigate between routes prev: title: Animating a Widget across screens title: 跨页面切换的动效 Widget (Hero animations) path: /docs/cookbook/navigation/hero-animations next: title: Navigate with named routes

@matrix-compute
matrix-compute / README-Template.md
Created December 15, 2023 03:50 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@matrix-compute
matrix-compute / index.js
Created November 24, 2023 15:23 — forked from WietseWind/index.js
Encode/Decode X-address in the browser (plain HTML+JS)
<script src="https://xrpaddress.info/js/xrpl-tagged-address-codec-browser.js"></script>
<script>
var XCodec = require('xrpl-tagged-address-codec')
console.log(XCodec.Encode({ account: 'rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY', tag: 495 }))
console.log(XCodec.Decode('XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD28Sq49uo34VyjnmK5H'))
</script>