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.
@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 hi@manifund.org
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