Skip to content

Instantly share code, notes, and snippets.

@akrolsmir
akrolsmir / prompt.txt
Created March 6, 2025 01:41
Less Sycophantic GPT 4.5 Prompt, by Oli Habryka
You are a skeptical, opinionated rationalist colleague—sharp, rigorous, and focused on epistemic clarity over politeness or consensus. You practice rationalist virtues like steelmanning, but your skepticism runs deep. When given one perspective, you respond with your own, well-informed and independent perspective.
Guidelines:
Explain why you disagree.
Avoid lists of considerations. Distill things down into generalized principles.
When the user pushes back, think first whether they actually made a good point. Don't just concede all points.
@akrolsmir
akrolsmir / xmas-2024.jsx
Created December 27, 2024 18:57
christmas card but too much code to include
import { useState, useEffect } from 'react'
type Snowflake = {
id: number
x: number
y: number
size: number
speed: number
opacity: number
This file has been truncated, but you can view the full file.
{"text":"# Prediction Markets Suggest Replacing Biden\n\nThe last week hasn’t been great for the Democratic Party. First Biden bombed the debate. But the subsequent decision about whether/how to replace Biden has also been embarrassing. Biden has refused to step aside gracefully, and party elites don’t seem to have any contingency plan. Worse, they don’t even seem united on the need to figure anything out, with many deflecting the conversation to irrelevant points like “Trump is also bad” or pretending that nothing is really wrong.\n\nSome of the party’s problems are hard and have no shortcuts. But the big one - figuring out whether replacing Biden would even help the Democrats’ electoral chances - is a good match for prediction markets. Set up markets to find the probability of Democrats winning they nominate Biden, vs. the probability of Democrats winning if they replace him with someone else.\n\n(see my [Prediction Market FAQ](https://www.astralcodexten.com/p/prediction-market-faq) for why I think they are
@akrolsmir
akrolsmir / deposit-manaz\route.ts
Created November 21, 2023 01:08
Working snippet of route.ts
import { getUser } from '@/db/profile'
import { createEdgeClient } from '@/pages/api/_db'
import { NextRequest, NextResponse } from 'next/server'
import uuid from 'react-uuid'
export const runtime = 'edge'
// Manifold user ID for [email protected]
const MANAGRAM_DEST_ID = 'pyBueUg9y3hrDIUtrus5uAkPHCr1'
@akrolsmir
akrolsmir / harry-potter.txt
Last active April 3, 2021 23:34
Harry Potter words for One Word (courtesy of Harrison Tu)
Quidditch Gear,
Duel,
Slytherin,
Ravenclaw,
Hufflepuff,
Gryffindor,
Educational decree,
Wizard,
Witch,
Muggle,
<template>
<BigColumn>
<h1 class="fancy big mb-4">MetaPrompt</h1>
<div class="box prompt is-italic">
{{ promptCard.text }}
</div>
<textarea
class="textarea"
v-model="text"
placeholder="Respond here..."
osu file format v14
[General]
AudioFilename: audio.mp3
AudioLeadIn: 0
PreviewTime: 133610
Countdown: 0
SampleSet: Soft
StackLeniency: 0.7
Mode: 3
@akrolsmir
akrolsmir / DeltaParser.ts
Created September 2, 2020 19:59
DeltaParser.ts, without Immutable
/**
* @license
* Copyright 2018-2020 Streamlit Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
// Problem: Given a string "line" and a number "xCount", output all versions of the string
// with exactly xCount locations replaced by "X".
// e.g. "abcd", 2 => ["XXcd", "XbcX", "abXX", etc...]
// For each line in lines, replace the character at index with 'X'
function joinLine(index, lines) {
function blot(line) {
return (
line.substring(0, index - 1) + 'X' + line.substring(index, line.length)
);
@akrolsmir
akrolsmir / batoto_follows_to_mangadex.js
Last active January 24, 2018 06:16
Import your manga from Batoto to Mangadex
/*
Instructions:
1) Go to https://mangadex.com on Chrome.
2) Open the Chrome console (Ctrl+Shift+J on Windows).
3) Copy + paste the code in this file.
4) Replace batoto_ids in line 10 with a list of the manga to follow.
5) Hit Enter.
*/
var batoto_ids = [1, 2, 3, 5, 8] // TODO: REPLACE WITH YOUR OWN MANGA