Skip to content

code

August 22 2023

New season of Hearthstone! Goodbye, next forty-eight hours.

New season of Hearthstone! Goodbye, next forty-eight hours. I'll be captive to this relentless obsession. Alongside Baldur's Gate 3, of course.




This patch, it sucks from the get-go. Bannana Slammas for life, I suppose.

broken combo
only broken enough for fourth place i suppose

The billboards up in Soho stir something within me. Something McLuhan might've coined, about the package being more valuable more than the item inside. The ads on NYC's billboards, uncountable as they are, most fade from memory like a worn-out jazz record. But their very existence on the giant sized wall, catching the eye of the odd twenty-somethings, mid-pilgrimage to their temple of Equinox, that broadcasts its own message. Sure, I could plaster an ad on some wall in a silent town but that lacks the jazz, the hum and pulse of the viewer's gaze, which makes all the difference in selling the song. Plenty artists wallow unseen, only a handful get to wallow under the spotlight.


Leaders need this one thing more than anything else: good sense. It's the same when it comes to your body, your thoughts, your work life. Be your own arbiter of good judgement.


Photos...they've been the game for me on Instagram lately, kind of like a guilty pleasure I suppose. Don't know why.

It's ludicrous when you think about how I'm using Instagram, disregarding entirely how they mapped out the service. Truly not giving a flying fuckkk. It's like a Finstagram, but taken to the logical conclusion of really only using Instagram for a glorified photo storage service. Picture it: me following no one, completely ignoring ads on the feed the company worked so hard on to build! A strange way to play, right?

But in its way, it's transformative. Instagram morphs into something else, a simple yet miraculous platform for my photos, a sanctuary. It's effortless to stick in my favorite tunes too, lending a voice to every image. And the filters? Oh, the filters. An array of options with a single, easy tap. Quite something, isn't it?



Oddly enough, I found myself the central character in some LLM tutorial – an instructional piece about using these LLMs for cold outreach on LinkedIn, of all things. Seeing this offered some clarity, unsheathing the mystery of the spam deluge that keeps finding me. Particularly from the VCs, the constant hum in the background. Leave me alone dammit!


Random post logic – all credit goes to the original creator: milkythemes!

<script>
    function loadScript(url, callback) {
    const head = document.head;
    const script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = url;
    script.onreadystatechange = callback;
    script.onload = callback;
    head.appendChild(script);
}

function luckyPost() {
    let ghostVersion = typeof version == 'undefined' ? 'v3.0' : version;
    let apiKey =
        typeof key == 'undefined' ?
            console.error('Ghost integration API key is missing. Please refer to documentation at https://milkythemes.com/plugins/lucky-post') : key;

    const pageUrl = `${window.location.protocol}//${window.location.hostname}`;

    const api = new GhostContentAPI({
        url: pageUrl,
        key: apiKey,
        version: ghostVersion
    });

    const postUrl = [];

    const randomBtn = document.getElementsByClassName("btn-random");
    const stringHostUrl = `[href="${pageUrl}/#rdm-post/"]`
    const randomPost = document.querySelector(stringHostUrl);
    
    const randomPostSelector = document.querySelectorAll('[href="https://www.bramadams.dev/rdm-post/"]');

    for (let i = 0; i < randomPostSelector.length; i++) {
        randomPostSelector[i].text = `Loading...`
    }


    api.posts
        .browse({ limit: 250 })
        .then((posts) => {
            posts.forEach((post) => {
                postUrl.push(post.slug)
            });
        })
        .then(() => {
        const randomPostSelector = document.querySelectorAll('[href="https://www.bramadams.dev/rdm-post/"]');
        
        for (let i = 0; i < randomPostSelector.length; i++) {
            randomPostSelector[i].text = `Open Random Post!`
            randomPostSelector[i].href = `${pageUrl}/${randomUrl(postUrl)}`
        }
            
        }).catch(() => {
    		const randomPostSelector = document.querySelectorAll('[href="https://www.bramadams.dev/rdm-post/"]');
        
            for (let i = 0; i < randomPostSelector.length; i++) {
                randomPostSelector[i].text = `OOPS!`
                randomPostSelector[i].href = `https://www.bramadams.dev/`
            }
    	});

    // The randomUrl function is used to grab a random array from the list 
    function randomUrl(postUrl) {
        return postUrl[Math.floor(Math.random() * postUrl.length)];
    }
}

loadScript('https://unpkg.com/@tryghost/content-api@latest/umd/content-api.min.js', luckyPost);
</script>

Tier 7 exists.


SOMEBODY HAS TO DIE

Blue Lock got dark!


big carbon copy!

Hey, the kid's scored a page on Wikipedia!

Atrioc - Wikipedia

Sticky Header for Ubud! (Put this in the code injection header)

<style>
    .c-header{
        position: sticky;
        z-index: 1;
        top: 0;
        background: var(--background-primary);
    }
</style>

June 20 2023

another banger alfred workflow

Writing

The Universal Tool
There is an old adage that “when you have a hammer, everything begins to look like a nail”

Code

Another Alfred banger. This time I'm appending to my weekly note > day of the week > events | thoughts | todo heading. It's basically the best thing ever to an organization and journaling nerd like me.

Example of thoughts pushed today (look at the time stamp!)

https://bram-adams.ghost.io/content/images/2023/06/example-of-result-of-weekly-push.png
example of result of weekly push.png

Alfred

https://bram-adams.ghost.io/content/images/2023/06/append-to-weekly-1.png
append to weekly 1.png
https://bram-adams.ghost.io/content/images/2023/06/append-to-weekly-2.png
append to weekly 2.png
https://bram-adams.ghost.io/content/images/2023/06/append-to-weekly-3.png
append to weekly 3.png

Python

import sys
import os
import datetime
import argparse
from pathlib import Path

# https://chat.openai.com/share/3e2173cd-b2da-4ae8-8dff-4d1ebde65fdd <- how this is made

append_to = os.getenv("append_to")
query = os.getenv("value")

# Get the day of the week
now = datetime.datetime.now()
day_of_week = now.strftime('%A').lower()
time_string = now.strftime('%H:%M:%S')

# Define the path of the Weekly_Folder
Weekly_Folder = Path("{YOUR_WEEKLY_FOLDER_PATH}")

# Get the most recent file in the Weekly_Folder
most_recent_file = max(Weekly_Folder.glob('*'), key=os.path.getctime)

# Define the section to append to based on the input category
if append_to == "todo":
    section = "### todo/" + day_of_week
    query = "- [ ] (" + time_string + ") "  + query
elif append_to == "events":
    section = "#### events/" + day_of_week
    query = "(" + time_string + ") " + query
elif append_to == "thoughts":
    section = "#### thoughts/" + day_of_week
    query = "(" + time_string + ") " + query
else:
    sys.stderr.write("Invalid category. Please choose either 'todo', 'events', or 'thoughts'.")
    exit()

# Read the file
with open(most_recent_file, 'r+') as file:
    lines = file.readlines()
    
    # Find the section and append the string_to_append
    start_append = False
    for i, line in enumerate(lines):
        if line.strip() == section:
            # Start appending after the section
            start_append = True
        elif start_append and (line.startswith("###") or line.startswith("####")):
            # Stop appending if we find another heading at the same or higher level
            lines.insert(i, query + '\n\n')
            break
    else:
        if start_append:
            # If the section was the last one, append at the end of the file
            lines.append(query + '\n\n')
        else:
            print(f"Could not find the section: {section}")
            exit()

    # Write the modified lines back to the file
    file.seek(0)
    file.write(''.join(lines))
    file.truncate()

sys.stderr.write(f"Successfully appended string to the {append_to} section on {day_of_week}.")

Obsidian Weekly Template

## Commitments

### todo/sunday

#### events/sunday

#### thoughts/sunday

### todo/monday

#### events/monday

#### thoughts/monday

### todo/tuesday

#### events/tuesday

#### thoughts/tuesday

### todo/wednesday

#### events/wednesday

#### thoughts/wednesday

### todo/thursday

#### events/thursday

#### thoughts/thursday

### todo/friday

#### events/friday

#### thoughts/friday

### todo/saturday

#### events/saturday

#### thoughts/saturday

bramadams.dev is a reader-supported published Zettelkasten. Both free and paid subscriptions are available. If you want to support my work, the best way is by taking out a paid subscription.

June 13 2023

glitch art, chat loops, farms, code poetry

Videos

I built a plugin that works like a DIY code interpreter where an end user decides what rules GPT should check against. GPT is smart enough to facilitate it's own retry logic, which is neat as hell!

Photos

the town of yakima has a really active git profile

https://bram-adams.ghost.io/content/images/2023/06/yakima-git-commits-1.png
yakima git commits 1.png
https://bram-adams.ghost.io/content/images/2023/06/yakima-git-commits-2.png
yakima git commits 2.png

Art

https://bram-adams.ghost.io/content/images/2023/06/glitch-jun-13-1.png
glitch jun 13 1.png
https://bram-adams.ghost.io/content/images/2023/06/glitch-jun-13-2.png
glitch jun 13 2.png
https://bram-adams.ghost.io/content/images/2023/06/glitch-jun-13-3.png
glitch jun 13 3.png

Code

One thing I do a lot is append text to specific headings in a MD file, so this Python script helps with just that!!

append_smart_file
append text to a specified md heading

Playing around with the e2e experience of a Readwise quote > app (or pseudocode). I also just got an iPad so I'm playing with the Freeform app :)

Poetry

Experimenting with Code Poetry more as an art form. Here's a few GPT results from my favorite song rn, Ascencionism:

Python:

ChatGPT
A conversational AI system that listens, learns, and challenges

Visual Basic:

Class Desire ' Well, I know what you want from me
    Property Reflection As Boolean ' You want someone to be your reflection
    Property Deception As Boolean ' Your bitter deception
    Function SetFree() ' Setting you free
        ' So you take what you want and leave
        Return True
    End Function
End Class

Class Mystery ' Who made you like this?
    Property BodyLanguage As String ' Who encrypted your dark gospel in body language?
    Property BlissfulAnguish As Boolean ' Synapses snap back in blissful anguish
End Class

Class PastLife ' Tell me you met me in past lives, past life
    Property InsideEating As Boolean ' Past what might be eating me from the inside, darling
    Property RhythmHalfDeity As Boolean ' Half of a rhythm, half deity
    Property GlitchesOrGaps As String ' Glitches in the code or gaps in a strange dream
End Class

Class Fantasy ' Tell me you guessed my future and it mapped onto your fantasy
    Property Mannequin As Boolean ' Turn me into your mannequin
    Property PuppetQueen As Boolean ' and I'll turn you into my puppet queen
End Class

Class DanceInTheDark ' Won't you come and dance in the dark with me?
    ' Show me what you are, I am desperate to know
    Property PerfectEnemy As Boolean ' Nobody better than the perfect enemy
    Property DigitalDemons As Boolean ' Digital demons make the night feel heavenly
End Class

Class Reality ' Make it real
    ' 'Cause anything's better than the way I feel right now
    Property BlacklitParadise As Boolean ' I can offer you a blacklit paradise
    Property DiamondsInTrees As Boolean ' Diamonds in the trees, pentagrams in the night sky
    Property LipstickChemtrailsRedflagsPinkNails As Boolean ' Lipstick, chemtrails, red flags, pink nails
End Class

Class Eye
    Property Door As Boolean ' With one eye on the door
    Property Rail As Boolean ' other eye on a rail
    Property ScarletTrail As Boolean ' Other, other eye following a scarlet trail
    Property HolyGrail As Boolean ' And the last few drops from the Holy Grail, now
End Class

Class DarkFashion
    ' Rose gold chains, ripped lace, cut glass
    ' Blood stains on the collar, please, just don't ask
    Function Feast() ' Be the first to the feast, let's choke on the past
        ' And take to the broken skies at last
        Return True
    End Function
End Class

Class Ascend ' You cannot watch me ascend
    ' And I know what you want from me
    Property Same As Boolean ' You want the same as me
    Property Redemption As Boolean ' My redemption, eternal ascension
    Function SetFree() ' Setting me free
        ' So I'll take what I want then leave
        Return True
    End Function
End Class

Class Disappear ' You make me wish I could disappear, oh
    ' You make me wish I could disappear
    Function Wish() As Boolean
        Return True
    End Function
End Class

bramadams.dev is a reader-supported published Zettelkasten. Both free and paid subscriptions are available. If you want to support my work, the best way is by taking out a paid subscription.

Jun 03 2023

latitude and longitude logic, the hardest part of programming is naming, spoiler for a chatgpt plugin im working on, lazy plot devices

Code

Built by AI! (tbh I didn't even bother to check if the feet and meter formulas were correct lol)

def convert_lat_lon_into_cardinal_direction(lat, lon, wiki_page_lat, wiki_page_lon):
    if lat > wiki_page_lat:
        lat_direction = "north"
    elif lat < wiki_page_lat:
        lat_direction = "south"
    else:
        lat_direction = ""
        
    if lon > wiki_page_lon:
        lon_direction = "east"
    elif lon < wiki_page_lon:
        lon_direction = "west"
    else:
        lon_direction = ""

    feet = round(364000 * ((lat - wiki_page_lat)**2 + (lon - wiki_page_lon)**2)**0.5)
    meters = round(feet * 0.3048)
    
    return {
        "lat_direction": lat_direction,
        "lon_direction": lon_direction,
        "feet": feet,
        "meters": meters
    }

The struggle of naming a method that calls other methods. main? logic? process?

async def process(lat, lon):
    geo_loc = await geosearch(lat, lon)
    random_geo_loc = choose_random_geo_loc(geo_loc)
    title = random_geo_loc['title']
    summary = get_page_summary(title)

    cardinals = convert_lat_lon_into_cardinal_direction(lat, lon, random_geo_loc['lat'], random_geo_loc['lon'])
    return {
        "title": title,
        "summary": summary,
        "cardinals": cardinals,
        "geo_loc": random_geo_loc
    }

Videos

Quotes

Roald Dahl’s poem “Television” says it all: “So please, oh please, we beg, we pray / go throw your TV set away / and in its place, you can install / a lovely bookshelf on the wall.” (View Highlight)
April 25 2023
Books vs Coachella. Spaces vs Tabs. The battle rages on around the fallen soldiers.

(pog)

In 2015, archaeologists reported that they'd found 3,000-year-old honey while excavating tombs in Egypt, and it was perfectly edible.

Thoughts

"I can explain" then some external interruption is such a lazy plot device, it's like why do you need to prevent characters from learning information due to hand of god events, its so lame (from watching XO Kitty)


alexa tts kindle is actually pretty great. reading while listening is a pretty powerful reading experience

Images

A cool thing I made is coming.

https://bram-adams.ghost.io/content/images/2023/06/slow-down-spoiler-1.png
slow down spoiler 1.png
https://bram-adams.ghost.io/content/images/2023/06/slow-down-spoiler-2.png
slow down spoiler 2.png

bramadams.dev is a reader-supported published Zettelkasten. Both free and paid subscriptions are available. If you want to support my work, the best way is by taking out a paid subscription.

May 18 2023

8-bit bram, queen charolette, nyu itp, agentic process humans vs bots, voice memos to whisper

Images

8-bit bram

https://bram-adams.ghost.io/content/images/2023/05/and-thats-on-compressong-ong.png
and thats on compressong ong.png
https://bram-adams.ghost.io/content/images/2023/05/bti-cover.png
bti cover.png

Bridgerton - Queen Charolette

I am Venus

https://bram-adams.ghost.io/content/images/2023/05/i-am-venus-1.png
i am venus 1.png
https://bram-adams.ghost.io/content/images/2023/05/i-am-venus-2.png
i am venus 2.png
https://bram-adams.ghost.io/content/images/2023/05/i-am-venus-2.5.png
i am venus 2.5.png
https://bram-adams.ghost.io/content/images/2023/05/i-am-venus-3.png
i am venus 3.png
https://bram-adams.ghost.io/content/images/2023/05/i-am-venus-4.png
i am venus 4.png

Code

This is great, I recommend!

Transcribing your iOS Voice Memos to Markdown with Whisper - Artur Piszek
I wrote a script to transcribe my apple voice memos to Logseq with OpenAI Whisper.

Went to NYU ITP Spring 2023, here were my favorite booths:

Videos

My internet is way better now -- thanks FioS! -- so I celebrated with a stream working on my monorepo and I had fun.

Perhaps the craziest workout I've ever seen

https://exrx.net/WeightExercises/Sternocleidomastoid/BWFrontNeckBridge

Zenitsu be doing it

When you realize that this guy and Caster got the happiest ends out of every main character in this series…

Music

Raw Thoughts

Animals unconsciously agent in their environment and change it (overeating resources -- finches for example)

Humans consciously agent their environment and change it (global warming for example)

Programs agent their environment in a feedback loop that is not conscious in the sense of serving the need to eat for survival but not unconscious due to fact that they know what’s going on with access to state of impossibly massive systems (which is why humans get caught off guard by bugs)


If coding with an LLM was painting, gpt serves as the broad strokes applied to the sketch of an artist -- it’s hallucinations serve as the rough edges of the paint stroke on the canvas. The artist meticulously changes a line or two and instead of deciding to paint a mountain in the background he decides to paint a tree and asks the LLM to draw the broad strokes of a tree and to reintegrate the surrounding landscape to make the tree seem like it was always there. But he doesn’t remember the size of a tree so he uses LLM as a reminder of how tall they are what color the bark is how many leaves a tree has, etc.

bramadams.dev is a reader-supported published Zettelkasten. Both free and paid subscriptions are available. If you want to support my work, the best way is by taking out a paid subscription.