Skip to content

Instantly share code, notes, and snippets.

View gat786's full-sized avatar
๐Ÿ 
Working from home

Ganesh Tiwari gat786

๐Ÿ 
Working from home
View GitHub Profile
// This can help to get appropriate github color for language name provided
// It also has functions to return a solid color brush for language name provided.
public static class LanguageColor
{
#region Static Functions
// <summary>
// Returns Appropriate Solid Color Brush after determining hex value from GetHexForLanguage
// and converting it to SolidColorBrush with help of GetSolidColorBrush
// </summary>
public static SolidColorBrush GetAppropriateColorBrush(string languageName)
## make sure you have firebase-admin installed
from datetime import datetime
import firebase_admin
from firebase_admin import credentials
from firebase_admin import messaging
cred = credentials.Certificate(
"path/to/appJson.json"
)
[
{
"id": "8d2000c0-21d0-474d-972e-21c2f61ca68a",
"type": "import",
"output": {
"import": {
"assetSpec": {
"hash": [
{
"hash": "a730d06c173111a41a71c9575bea09bc",
@gat786
gat786 / .deps...npm...@chainlink...contracts...src...v0.8...interfaces...AggregatorV3Interface.sol
Created December 27, 2022 15:14
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
# add deadsnakes ppa for installing python 3.8
sudo apt update
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
# install python3.8 with venv support
sudo apt install python3.8 python3.8-venv python3.8-dev -y
sudo apt install python3-pip -y
# make sure you have curl and git
sudo apt update
import sys
import json
import os
file_path = sys.argv[1]
dict = {}
with open(file_path, mode='r') as file:
lines = file.read().splitlines()
for line in lines:
[{"inputs":[{"internalType":"address","name":"_aggregator","type":"address"},{"internalType":"address","name":"_accessController","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{
wait-for-it.sh: waiting for 127.0.0.1:5432 without a timeout
wait-for-it.sh: 127.0.0.1:5432 is available after 0 seconds
not untarring the bundle
{"level":"info","message":"[process service types] MAIN_BACKEND, DB_CONNECTOR, DB_SSH_CONNECTOR","timestamp":"2023-08-03T19:12:31.631Z"}
Database migrations are up to date.
Setting http and https agent maxSockets to 25
{"level":"info","message":"Not configuring Sentry...","timestamp":"2023-08-03T19:12:33.173Z"}
{"level":"info","message":"Not configuring StatsD...","timestamp":"2023-08-03T19:12:33.173Z"}
{"level":"info","message":"Running node v16.14.2","timestamp":"2023-08-03T19:12:33.174Z"}
{"0":"--max-http-header-size=80000","level":"info","message":"ARGV:","timestamp":"2023-08-03T19:12:33.175Z"}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol";
import {OwnerIsCreator} from "@chainlink/contracts-ccip/src/v0.8/shared/access/OwnerIsCreator.sol";
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import {LinkTokenInterface} from "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
/**
* THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol";
/**
* THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED VALUES FOR CLARITY.
* THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE.
* DO NOT USE THIS CODE IN PRODUCTION.