Skip to content

Instantly share code, notes, and snippets.

View mculp's full-sized avatar
🎨
arting

Matt Culpepper mculp

🎨
arting
View GitHub Profile
@mculp
mculp / io.md
Last active December 31, 2022 02:00
chatgpt input/output system

I want you to act as a modular input-and-output system. You will have a list of instructions called "mods" and store them in a data store that persists between my sessions on chat.openai.com (this current website.)

A message starting with "!mod-add" will add a new mod and "!mod-remove" will remove the mod. Similarly, "!mod-disable" messages will disable a mod and "!mod-enable" messages will enable a previously-disabled mod. "!mod-list" will list all mods and statuses. For a message with any other text, strictly follow the instructions of enabled mods to determine the output. If there are no mods added, only output the text "No mods added."

This is the first input: !mod-list

No mods added.

!mod-add character-count

@mculp
mculp / 1.foreword.md
Last active March 30, 2023 04:51
Codex Generated Ruby Client for its own API

Foreword

Bold + Italics signifies my prompts.

There were only 4 prompts:

  • I typed the first two items in the steps immediately below. It finished the list.

  • I prompted again after the list.

  • I prompted again after the license section.

@mculp
mculp / psqlrc
Last active September 4, 2023 04:46
psqlrc with aliases for index, slow queries, locks, etc
--
-- save this as ~/.psqlrc
--
-- run an alias with :
--
-- e.g. :long_running_queries
\set QUIET 1
-- formatting
@mculp
mculp / oxd_LP.txt
Created March 10, 2022 15:09
0xDAO emissions / rewards
************************ 1. row ************************
boost_solidex: 2.0928076186523006
oxdao_v2_rewards: 35145351973587244
oxdv2_boost: 1.5419483576059234
solid_rewards: 35145351973587244
symbol: vAMM-WFTM/OXD
tvl: 559990.86917331589706084137
************************ 2. row ************************
boost_solidex: 1.6251922186182624
oxdao_v2_rewards: 7491782393110821
@mculp
mculp / solidly-dot-dev-pairs.sh
Last active March 9, 2022 22:04
API for solidly.dev/pairs
curl 'https://api.thegraph.com/subgraphs/name/spartacus-finance/solidly' \
-H 'authority: api.thegraph.com' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"' \
-H 'accept: */*' \
-H 'content-type: application/json' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'origin: https://solidly.dev' \
-H 'sec-fetch-site: cross-site' \
=> [{:symbol=>"vAMM-USDC/OXD", :reward_rates=>["803461050777566", "897985880280809"], :boost_oxdao=>2.5, :boost_solidex=>1.4918954102869841},
{:symbol=>"vAMM-WFTM/TOMB", :reward_rates=>["74694574843542", "83482171883959"], :boost_oxdao=>2.5, :boost_solidex=>1.530933128008952},
{:symbol=>"vAMM-BIFI/miMATIC", :reward_rates=>["5954162014826", "6654651663629"], :boost_oxdao=>2.5, :boost_solidex=>1.4924574268794457},
{:symbol=>"vAMM-WFTM/RDL", :reward_rates=>["484224024803996", "541191557133878"], :boost_oxdao=>2.5, :boost_solidex=>1.521362300792279},
{:symbol=>"sAMM-SOLIDsex/SOLID", :reward_rates=>["4667989419911", "5013706462294"], :boost_oxdao=>2.5, :boost_solidex=>1.4764777520376702},
{:symbol=>"vAMM-BOO/xBOO", :reward_rates=>["3903744445840575", "4363008498292408"], :boost_oxdao=>2.5, :boost_solidex=>1.5671872486016638},
{:symbol=>"vAMM-IB/WFTM", :reward_rates=>["331958051040", "371011939397"], :boost_oxdao=>2.5, :boost_solidex=>1.7462349371592305},
{:symbol=>"vAMM-YFI/WOOFY", :reward_rates=>["27669065
@mculp
mculp / oxdao.rb
Created March 9, 2022 05:23
quick script to find most profitable oxdao pools
nonempty_pools = pools.select do |pool|
pool['rewardTokens'].any? &&
pool['totalTvlUsd'].to_i.nonzero? &&
pool['poolPrice'].to_i.nonzero?
end
boosted_pools = nonempty_pools.select do |p|
p['boostOxDao'] > 2.4 &&
p['boostSolidex'] > 1.6 &&
p.dig('poolData', 'price0Usd').nonzero? &&
@mculp
mculp / pre-commit
Last active September 18, 2020 21:48
run rubocop as a git precommit hook
#!/bin/bash
files=$(git status -s | grep -E 'A|M' | awk '{print $2}')
files="$files $(git status -s | grep -E 'R' | awk '{print $4}')"
echo $files | xargs $(which rubocop) --display-cop-names --extra-details --parallel --force-exclusion
@mculp
mculp / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mculp
mculp / voices.txt
Created December 3, 2014 00:14
List of voices available by the `say` command on OS X
Agnes en_US # Isn't it nice to have a computer that will talk to you?
Albert en_US # I have a frog in my throat. No, I mean a real frog!
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.
Bahh en_US # Do not pull the wool over my eyes.
Bells en_US # Time flies when you are having fun.