Skip to content

Instantly share code, notes, and snippets.

View broomstick73's full-sized avatar

James Conley broomstick73

View GitHub Profile
-- old selection names
BEGIN;
MySQL [obpsandlotdb]> select s.id, s.Name, s.EvalJson, e.MatchName, m.MarketName from ObpSelections s inner join ObpMarkets m on s.ObpMarketId = m.Id inner join ObpEvents e on m.ObpEventId = e.Id where e.SportName = 'mlb' and s.EvalJson like '%HomeRuns%' and s.Name like '%To Hit 3+ Home Runs%' and m.MarketName like '%To Hit 3+ Home Runs%' and StartTime >= '2025-09-25';
+-----------+---------------------------------------------+---------------------------+-------------------------------------------------------------------+-----------------------+
| id | Name | EvalJson | MatchName | MarketName |
+-----------+---------------------------------------------+---------------------------+-------------------------------------------------------------------+-----------------------+
| 279249567 | |Alec Burleson to Hit 3+ Home Runs| | @HomeRuns_Match_6894
@broomstick73
broomstick73 / mlb_live_specials.sh
Created September 24, 2025 13:33
MLB Live Specials Script - Template Creation API Call
#!/bin/bash
# Base URL for API requests
BASE_URL="https://rt-obp-sandlot.int.use2.fndlsb-dev.com/api/Template/Create"
curl -X 'POST' \
"$BASE_URL" \
-H 'accept: */*' \
-H 'Content-Type: application/json-patch+json' \
-d '{
@broomstick73
broomstick73 / gist:0d52150d55cec68334995f5ed53088d7
Last active September 15, 2023 19:15
Delete Duplicate Selections from PROD
--select dupes
mysql> select MarketId, Name, count(1) from springboxdb.Selection group by MarketId, Name having count(1) > 1;
+----------+------------------------------------------------------------------------+----------+
| MarketId | Name | count(1) |
+----------+------------------------------------------------------------------------+----------+
| 54745 | A.J. Brown 100+ receiving yards and Philadelphia Eagles to win | 2 |
| 54745 | A.J. Brown 125+ receiving yards and Philadelphia Eagles to win | 2 |
| 54745 | A.J. Brown 75+ receiving yards and Philadelphia Eagles to win | 2 |
| 54745 | A.J. Brown and Justin Jefferson to combine for 150+ receiving yards | 2 |
| 54745 | A.J. Brown and Justin Jefferson to combine for 200+ receiving yards | 2 |
@broomstick73
broomstick73 / gist:9b6febab54a08ec3830f56bef7c9e938
Created September 13, 2023 16:12
check for duplicate selection name & market id
mysql> select MarketId, Name, count(1) from springboxdb.Selection group by MarketId, Name having count(1) > 1;
Empty set (8.34 sec)