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
<# | |
.Synopsis | |
Automatically finds, runs and places Outlook into the system tray. | |
.Description | |
Automatically finds, runs and places Outlook into the system tray. | |
By default, Outlook will start full-screen even when you have the option to minimize tray enabled and start the app as minimized. |
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
$transmission = Join-Path "C:\Program Files\Transmission" transmission-remote.exe | |
$server = "127.0.0.1:9091" | |
function GetTorrentObjectList { | |
param ( | |
$TorrentList | |
) | |
$torrents = [Collections.ArrayList]@() | |
foreach ($torrent in $TorrentList[1..($TorrentList.Count - 2)]) { |
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
#sidebar-widget div.custom-scrollbar.custom-scrollbar { | |
width: 100; | |
height: 990px; | |
padding: 0px 0px 30px; | |
} | |
div.tickerlist__container { | |
height: 1000px; | |
} |
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
$relays = Invoke-WebRequest -Uri https://explorer.mainnet.cardano.org/relays/topology.json | ConvertFrom-Json | |
$relays2 = $relays.Producers | Where-Object { | |
$_.addr -like '*relays*' | |
} | Sort-Object { $_.addr -eq 'relays-new.cardano-mainnet.iohk.io' } -Descending | |
$newRelays = @{ | |
"Producers" = [Collections.ArrayList]@( | |
@{ | |
"addr" = "127.0.0.1" |
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 { | |
Instruction, | |
SwapInstructionsResponse | |
} from "@jup-ag/api"; | |
import { | |
AddressLookupTableAccount, | |
ComputeBudgetProgram, | |
Connection, | |
Keypair, | |
PublicKey, |
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
// By Pyro @ www.sexonsol.com | |
// Price class, basic types and interface for PriceManager provided for you: | |
import { QuoteResponse } from '@jup-ag/api'; | |
import { BigNumber } from 'bignumber.js'; | |
enum WellKnownTokenMint { | |
USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", | |
USDCet = "A9mUU4qviSctJVPJdBJWkb28deg915LYJKrzQ19ji3FM", |
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
// By Pyro @ www.sexonsol.com | |
import { Console } from "node:console"; | |
type LogLevel = "INFO" | "ERROR" | "WARN" | "DEBUG" | "TRACE"; | |
/** Asynchronous Promise-based logger */ | |
export default class AsyncLogger extends Console { | |
public name: string; | |
constructor(name: string) { | |
super({ |
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
// Here is a portion of the code used in sexbot.sol that handles errors when sending txs | |
/** | |
* Anchor can't handle all errors for some reason, so this exists to handle those cases | |
* @param logs | |
* @returns | |
*/ | |
export const extractErrorDetailFromLogs = ( | |
logs: 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
import * as nodeFetch from 'node-fetch'; | |
import fetch from 'fetch-retry' | |
import https from 'https'; | |
const _fetch = fetch(nodeFetch.default); | |
type FetchFn = typeof nodeFetch.default; | |
export type Fetcher = (...args: Parameters<FetchFn>) => ReturnType<FetchFn>; | |
export type RetryFetcherWithCustomAgent = (agent: https.Agent) => Fetcher; | |
export const RetryFetcher: Fetcher = (...args) => { | |
const [url, init] = args; |
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 { RootDatabaseOptionsWithPath, open } from 'lmdb'; | |
import { addressLookupTableDBPath } from '../const'; | |
const _dbOptions: RootDatabaseOptionsWithPath = { | |
path: addressLookupTableDBPath, | |
cache: { // https://github.com/kriszyp/weak-lru-cache#weaklrucacheoptions-constructor | |
cacheSize: 16777216, // 16MB - maximum | |
clearKeptInterval: 100, | |
txnStartThreshold: 3 |