Skip to content

Instantly share code, notes, and snippets.

View ORESoftware's full-sized avatar
🏐
Focusing

Alexander Mills ORESoftware

🏐
Focusing
View GitHub Profile
@ORESoftware
ORESoftware / coach-header.tsx
Last active May 30, 2025 16:32
file example
// source file path: ./src/components/nav/coach-header.tsx
'use client';
import React, { useEffect, useRef, useState } from 'react';
import Link from 'next/link';
import {
ChevronDownIcon,
ChevronUpIcon,
MagnifyingGlassIcon,
PersonIcon,
fame: SHA/Branch: HEAD
fame: Files must match at least one of: [ /.*/ ]
fame: Full branch name: dev
fame: Could not find a fame.conf.js file.
fame: processing commit no.: 1159, finished: 100.00%
┌──────────────────────────────────────────────┬────────────────┬──────────────┬─────────────┬───────────────┬────────────────────┬─────────────────┐
│ Author │ Files Modified │ Commits │ Added Lines │ Removed Lines │ Total Line Changes │ Net Lines Added │
├──────────────────────────────────────────────┼────────────────┼──────────────┼─────────────┼───────────────┼────────────────────┼─────────────────┤
[email protected] │ 1948 / 83.03% │ 896 / 77.31% │ 1541001 │ 211896 │ 1752897 │ 1329105 │
@ORESoftware
ORESoftware / instagram.md
Created May 27, 2025 15:28
how to get RTMP key for Instagram Livestream

Below is the fastest official way to grab the “IG code” (Instagram’s RTMP URL + Stream Key) that lets you send a feed from OBS, Streamlabs, vMix, etc. to Instagram Live.


1. Check you have access

Requirement Why it matters
Professional account (Creator or Business) Instagram Live Producer is only unlocked for professional profiles. ([Wistia][1])
Desktop browser (instagram.com) The stream key is generated only on the web interface, not in the mobile app. ([Epidemic Sound][2])
@ORESoftware
ORESoftware / next-prod.md
Created April 26, 2025 04:09
error obfuscation in next.js / vercel in prod

If we have a server action like this:

'use server';

export async function serverActionRoutine(){
    throw new Error('prod error');
}
@ORESoftware
ORESoftware / gist:d74b1e6ffd7f02fd658d28c5597a3367
Created March 9, 2025 01:22
drizzle ORM command results in truncating table

doing migration with Drizzle ORM delete/truncated all data from our "skills" table:

ALTER TABLE "skills" ALTER COLUMN "default_val" SET DEFAULT '{"value":1}';
ALTER TABLE "skills" ALTER COLUMN "skill_desc" SET DATA TYPE jsonb;
ALTER TABLE "skills" ALTER COLUMN "skill_desc" SET DEFAULT '[]'::jsonb;
ALTER TABLE "skills" ALTER COLUMN "skill_desc" SET NOT NULL;
ALTER TABLE "skills" ALTER COLUMN "search_vector" SET DEFAULT ''::tsvector;
ALTER TABLE "skills" ALTER COLUMN "embedding" SET DEFAULT null;
⨯ [Error: {"error":{"error":{"name":"NeonDbError","sourceError":{}},"trace":"dd-trace-upsert-coach-profile"},"trace":"dd-trace-a6c5-f92d9122e890"}] {
digest: '1396788746'
}
@ORESoftware
ORESoftware / main.gleam
Created February 25, 2024 08:18
Main gleamlang file
import gleam_cowboy
import gleam/http.{Request, Response}
import gleam/http/response.{ok}
pub fn main() {
gleam_cowboy.start(fn(_req: Request) {
ok("Hello, Gleam!")
}, on_port: 3000)
}
@ORESoftware
ORESoftware / pool.md
Last active January 17, 2024 20:36
goroutine reuse for logging purposes

Code looks fine to me. There might be a hidden race condition. The p.Count++ and p.Count-- are atomic ops. For every ++ it's corresponding -- should be called TBD.

package pool

import (

we can use this domain middleware

const Domain = require('domain');

app.use((req,res,next) => {
@ORESoftware
ORESoftware / fixed.js
Last active December 27, 2022 09:53
here is fix for code
const getBBBMeetingInfo = async (meetingID) => {
const getMeetingInfo = api.monitoring.getMeetingInfo(meetingID);
const result = await bbb.http(getMeetingInfo);
result.meetingID = meetingID;
if(result.returncode == 'FAILED'){
updateNotificationCallStatus(meetingID)
}