Skip to content

Instantly share code, notes, and snippets.

View warlyware's full-sized avatar

Dan Ward warlyware

View GitHub Profile
@warlyware
warlyware / optimalTransaction.ts
Created March 19, 2024 09:24 — forked from stegaBOB/optimalTransaction.ts
Gets an optimal transaction with priority fees and minimum CU limits in parallel with Promise.all
async function getPriorityFees(instructions: TransactionInstruction[]): Promise<number> {
// replace with real function
return 426;
}
async function getSimulationUnits(
connection: Connection,
instructions: TransactionInstruction[],
payer: PublicKey,
lookupTables: AddressLookupTableAccount[]

Keybase proof

I hereby claim:

  • I am warlyware on github.
  • I am warly (https://keybase.io/warly) on keybase.
  • I have a public key ASDp4YUfXR2rc53HnO1ytL8lhstqn2G-0FGJGTOwH40m_go

To claim this, I am signing this object:

@warlyware
warlyware / cloudSettings
Last active January 22, 2021 01:10
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-01-22T01:10:38.889Z","extensionVersion":"v3.4.3"}
@warlyware
warlyware / cloudSettings
Last active January 21, 2021 23:25
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-01-21T23:25:08.542Z","extensionVersion":"v3.4.3"}
const LogRocket = require('logrocket')
const express = require('express')
const { SESSION_SECRET } = require('../auth-api/config/config')
const app = express()
LogRocket.init(process.env.LOGROCKET_APP_ID)
require('../auth-api/config/passport')(app)
app.use(require('cookie-parser')())
@warlyware
warlyware / html-map-marker.js
Last active January 18, 2020 03:03
Custom HTML Google Map Marker
class HTMLMapMarker extends OverlayView {
constructor() {
super();
this.latlng = args.latlng;
this.html = args.html;
this.setMap(args.map);
}
createDiv() {
this.div = document.createElement('div');
@warlyware
warlyware / SpotifySaver.user.js
Last active May 16, 2018 21:36
Tampermonkey Spotify Saver
// ==UserScript==
// @name Spotify Saver Script
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://open.spotify.com/*
// @grant none
// @require https://code.jquery.com/jquery-3.3.1.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@warlyware
warlyware / binary-search-tree.js
Created November 20, 2017 15:53
Finding the Right Balance - code example 2
class BinarySearchTree {
constructor() {
this.root = null;
}
add(value) {
const node = this.root;
if (!node) {
this.root = new Node(value);
return this.root;