Skip to content

Instantly share code, notes, and snippets.

View swap.json
{
"percentDifference": null,
"quoteResponse": {
"contextSlot": 234356176,
"inAmount": "10000789",
"inputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"otherAmountThreshold": "1898352237793",
"outAmount": "1900252490283",
"outputMint": "7ePdBZeVTiACApHD2MbuG8AAmpnrjBW5GVwJXvzQoue8",
"platformFee": null,
View gist:1de9afbb181c4fd5a2ace98ce0531057
# How to set up zsh on Ubuntu
Initially, it is necessary to install git, curl, and obviously zsh beforehand.
View gist:658a1854d8fb91e8e319e87f85ef1b52

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

View blockadeio.yaml
openapi: 3.0.1
info:
title: Blockade.io
description: Block suspicious and malicious indicators in participating browsers
version: "v1"
servers:
- url: https://api.blockade.io/
@vikramsoni2
vikramsoni2 / memory.py
Created December 6, 2023 15:35
memory
View memory.py
import os
from datetime import datetime, timezone
from utils.models import Message, ChatMessage
from tokenizers import Tokenizer
from typing import Any, Callable, Dict, List, Optional, cast, Union
from utils.config import Config
# from dotenv import load_dotenv, find_dotenv
# load_dotenv(find_dotenv())
@williamleecn
williamleecn / trc20-offline-sign.js
Created December 6, 2023 15:34 — forked from andelf/trc20-offline-sign.js
Send TRX20 token, sign offline
View trc20-offline-sign.js
const TronWeb = require('tronweb');
const HttpProvider = TronWeb.providers.HttpProvider;
const fullNode = new HttpProvider("https://api.trongrid.io");
// const fullNode = new HttpProvider("http://192.168.1.162:8090");
const solidityNode = new HttpProvider("https://api.trongrid.io");
const eventServer = new HttpProvider("https://api.trongrid.io");
const privateKey = "3481E79956D4BD95F358AC96D151C976392FC4E3FC132F78A847906DE588C145";
const tronWeb = new TronWeb(fullNode, solidityNode, eventServer, privateKey);
View .zshrc
method_gac() {
git add .
branch_name=$(git branch | grep \* | cut -d ' ' -f2)
echo "Branch Name: $branch_name"
# Extracts the ticket number from the branch name in #!/bin/zsh
ticket_number=$(echo $branch_name | grep -o -E '[0-9]+' | head -1)
echo "Ticket Number: $ticket_number"
View workshop-sql-advanced.sql
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: bdd_advanced
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
View Potential Maintainers
Maintainers:
bobby285271: cinnamon.warpinator, cinnamon.warpinator
mkg20001: cinnamon.warpinator, cinnamon.warpinator
View Changed Paths
x86_64-linux cinnamon.warpinator
aarch64-linux cinnamon.warpinator