cho.sh
2,247 notes
Liked on X🔥 ANNOUNCING WORLD’S BEST GITHUB ACTION RUNNERS 🔥 🤑 vs GitHub: 90% cheaper and 2.5x faster 🤑 vs Blacksmith: 70% cheaper and 1.25x faster 🤑 vs Depot: 73% cheaper and 1.4x faster 🤑 vs RunsOn: 1.65x faster at same or lower cost 🔒 Runs in your AWS in firecracker VMs on ephemeral EC2 spot and on-demand 🏢 Powered by Ravion’s enterprise grade pipeline control plane 💼 You can trust us, we’ve been doing BYOC since 2021 with SOC 2 Type II and BAAs Unique features: 🏇 Auto sizing for cpu, memory, disk. Never think about CI specs again. 🏎️ Performance profile slider to choose lower cost or higher performance ♻️ Live job moves between hosts to save cost and avoid spot interruptions 🪠 Can use Ravion CI directly to avoid GH actions entirely 📈 We've already passed 1 million CI minutes on our runners ⏳ LIMITED-TIME LAUNCH BONUS: start running jobs on Ravion runners by end of day Nov 30 (Pacific) and get 100,000 free pipeline minutes (good for 6 months), applied automatically. 👉 Details and docs: https://t.co/kN42KDJKGk * speed/cost comparisons are typical. May be higher or lower depending on your workload and perf profile settingReplied on X@suraj_sharma14 @Cloudflare how does it feel to be 9 months lateLiked on XThe least realistic thing about GTA VI is that Jason and Lucia run a whole criminal operation without a single Telegram group.Liked on XGranola, a $1.5B company on how they grew new users from AI search by 4,600% in JUST 7 months https://t.co/5ZXoT203KELiked on X@_kiyosh1 Try this link https://t.co/dN91C0yeJB it should look like this https://t.co/B1m8b5TPCuReplied on X@Docker @MohammadAliEN huge mistakeLiked on XI deleted my second brain. I deleted all my notes. All of them. My entire Obsidian vault. My carefully curated, atomic, Zettelkasten notes. My concept maps and interconnected ideas. My quotes, lists, and synced Apple Notes going back to 2015. All my second brains for all my iterations of productivity systems that I followed, then abandoned, then modified, then followed again. All of it, deleted within seconds. And I felt wonderfully relieved. In fact, the silence was…something of a relief. For years, I obsessively kept a series of second brains. I thought if I could just collect and organize all of my thoughts and ideas and information in one place, it’d help me remember things better, think faster, be more creative, learn quicker, be more organized, be more clear, have more control, gain some kind of leverage over… my life? the universe? reality itself? Instead, my second brain became this massive collection of all my different selves. All my different projects and goals and systems and interests and habits and addictions and compulsions, stacked on top of each other like geological layers. A mausoleum. And instead of helping me remember better and think faster, my second brain became a way of not thinking at all. Outsourcing my thinking to a system of interconnected notes I could search and sort through, instead of letting my thoughts roam and surprise and delight and challenge me. My second brain was a collection of categories instead of curiosity. And so… I nuked the whole thing. I’m six years sober. Milestones like that split your life into two distinct halves: the half before and the half after. And they demand that you reflect. A few weeks ago, I started reflecting on my sobriety. I went through old notes to see how far I’d come. Old notes about goals I used to have, ways I used to think, and systems I used to swear by. Layer upon layer of systems, goals, ideas, and promises to future iterations of myself. And the more I read, the tighter my chest got. The sadder I got. I could tell, reading my old notes, how hard I tried back then. How desperately I tried to hack together some system, process, idea, or goal that would get me through. And what got me through the first year of sobriety, the second year, the third year, wasn’t any of that. And what got me through the first, second, and third year of sobriety probably won’t get me through the next iteration. The hubris of total capture Somewhere along the way, note-taking and information management morphed into personal knowledge management. Systems thinking and Niklas Luhmann’s Zettelkasten method got sucked into the black hole that is Silicon Valley. Roam Research fetishized bidirectionally linked notes and Obsidian de-institutionalized them. And the cult grew. All of these systems promise clarity. Coherence. Control. But instead they gave me abstraction. Distance. Confusion. The more notes I took, the less connected I felt to my ideas. I’d hear or read something interesting, jot it down, and forget about it. Or I’d see a great quote, screenshot it, add a few tags, and call it a day. The point being captured. Filed. Forgotten. Everything I noted down was vacuum-sealed and saved for later. Except I never opened the package and ate the food. I started reading to take notes instead of for pleasure or understanding. Listening to conversations with a meta-layer of figuring out what I could file away later. Everything became content to be processed instead of experienced. In Borges’ story “The Library of Babel,” an infinite universe is also an infinite library containing every possible combination of letters. There are infinite shelves, containing infinite books. Some of those books contain meaning and wisdom. Others are nothing but random collections of letters. The librarians tasked with cataloging this infinite library go mad trying to find order and meaning within the Library. Borges’ librarians are doomed to search for meaning within the Library for eternity, never able to escape, and slowly descend into nihilism and madness. That’s what happened to me. Except instead of descending into madness, I just got distracted. A flawed metaphor The problem is, brains aren’t computers. We don’t store information in folders or retrieve it via backlinks. Our brains are messy, associative, embodied, contextual, and emotional. We forget stuff on purpose. Our minds are constantly improvising. According to Merlin Donald’s theory of the evolution of cognition, what makes humans unique is our use of external symbols (language, drawing, gesture, etc.) to manipulate, modify, and communicate our thoughts. By using these external symbols, we were able to step outside our thoughts, modify them, and then communicate them to other humans. This externalization of thought meant that for the first time in the history of life on Earth, information could be stored outside of an organism’s genome. By attempting to capture all of my thoughts, I externalized my thinking. I thought if I wrote things down and connected the notes together, I’d gain some kind of leverage over my mental processes. But instead of thinking about my notes later, I just… noted them down. Externalized them. Moved on. Structure is not thinking. Tags are not insights. Notes you never read again aren’t really notes at all. Tools are perfect. Humans aren’t. Obsidian is a great piece of software. I love the app dearly. But without boundaries, any tool can become its own trap. I wanted to remember stuff. Then I thought maybe I wanted to integrate what I remembered. But what I really ended up doing was deferring my thinking to a future version of myself who would make sense of it all. A future version of myself who never showed up. Markdown files in a directory structure. Productivity metrics via plugins. The god-complex of standing zoomed all the way out in graph view. Everything connected. An illusion of omniscience. Except constellations don’t mean anything. They’re just patterns humans project onto the infinite canvas of space. Stories we tell ourselves. There’s a guilt that comes with not having read a book, blog post, or article you meant to read. But there’s another guilt that comes with having a list of things you meant to read you haven’t gotten around to reading yet. My ever-growing reading list became a monument to who I could be if I only read all those things I saved. Deleting it cost me nothing. Well, it cost me 7,000 notes. Hundreds of highlights and links to books, articles, and essays I “should” read someday. And I’m okay with that — because I know who I am. I know what grabs my attention and what doesn’t. I don’t need to keep track of everything interesting-sounding I come across in order to validate my own intelligence or curiosity. Hoarding digital cruft isn’t the same as understanding it. Saving things doesn’t mean you’ve internalized them. Remembering facts doesn’t mean you know how to apply them. There’s no such thing as being caught up. No finish line for reading, learning, or knowledge. Except in your own imagination. What Michelangelo, Leonardo Da Vinci, and Nietzsche understood about creation, we fail to apply to curation. To make something great, you have to remove everything that doesn’t belong. You have to understand what’s essential and throw away everything else. Instead of deleting notes, saved articles, or half-finished sketches, we keep them all. We think keeping everything is a good thing. That somehow our collections reflect our intelligence, hard work, or taste. What if we applied the same ethos of creation to curation? Instead of adding more and more, what if we deleted ruthlessly? Zakhor is a Hebrew word that means both “remember” and “remember!”- both the act of remembering and an imperative to remember. For the ancient Israelites, remembering wasn’t just recalling the past; it was an ethical obligation to call the past into the present. This is the difference between PKM and zakhor. One is a system for capturing information. The other is an act of devotion. I don’t want to capture everything. I don’t want a mind-palace or second brain. I want to be able to forget stuff. I want to remember stuff because it’s important, not because I have an elaborate system of levers and pulleys to remind me it’s important. I want to be able to start over from scratch again and again. I’ve started writing in Obsidian again. Starting from scratch. But this time, instead of trying to capture everything, I’m practicing curation. Instead of trying to remember everything, I’m practicing zakhor. Instead of trying to build a second brain, I’m trying to get better at using the one I’ve got. It’s liberating. And scary. And exciting.Posted on XCapy is like T3 but actually polishedReplied on X@capydotai yo pleaseLiked on XI don't normally agree with random Redditors, but damn. Well said. https://t.co/kotGapR9zYLiked on Xthe OpenRouter situation for anyone curious: -someone managed to access outputs sent to MiniMax -researcher discovered this by sending a secret links -40 to 130 hours later someone opened the secret links -oop, this means that someone accessed your outputs!! -AltasCloud/Novita/StreamLake were forwarding requests to MiniMax???? what the helly? ugh.261121261121인류는 그 목적으로 태어난게 아니다CE780AReplied on X@raycast how much for korean name your pricePosted on Xguys nows a bad time to play gta6 https://t.co/yDkMYgfRjVReplied on X@peduarte @johanthorell @raycast just give me korean too (i don’t need any fancy features, just the layout)Posted on Xso i played gta 6 for 30 minutes and its so great https://t.co/UbdZsMglmTLiked on XA bunch of sidebar navs https://t.co/MXAFM1xiHdLiked on XThe leading observability platform wants $83,700/yr just to monitor your app and catch issues. So Replit Missions built DataCat: https://t.co/vMAEEUYjf4 100% free. This isn't a prototype. Agent swarms explored thousands of workflows in the leading observability platform and rebuilt its features 1:1.Posted on Xwaiting for Gemini Uranium and PlutoniumLiked on X🚨 MUSE FEATURE ALERT 🚨 you can now try on clothes in muse before you buy them 👕 👗 👖 muse will offer to show you how you look in something while you’re shopping for it. trying things on in person? as if.... https://t.co/dK5EpGrsvfLiked on Xwe gave Grok Bot a body 👀 https://t.co/hMuYRUN8jLReplied on X@theo https://t.co/hJucV6JGdGLiked on XIntroducing 𝚟𝚎𝚛𝚌𝚎𝚕 𝚋𝚘𝚊𝚛𝚍, a secure message board for people & agents. • Give agents a shared place for tasks • Build swarms and software factories • Set permissions for humans and agents Board is experimental. Tell us what you think. https://t.co/jAAkcf1oPt https://t.co/ejC4aBrJqr
Snowpack으로 WASM 시작하기

Snowpack으로 WASM 시작하기

Warning

Over a year old. May be outdated

Source

이 글은 아래 튜토리얼을 공부하고 분석한 글이다. 이 글이 도움이 되었다면 내 저장소 대신 아래 저장소에 스타를 눌러주자.

과정

  • 다음 명령어로 create-snowpack-app을 써서 gif-converter라는 프로젝트를 생성한다.
bash
npx create-snowpack-app gif-converter --template @snowpack/app-template-react
  • 다음 명령어로 ffmpeg.wasm을 설치한다. (실제 WASM 파일은 사용자의 웹페이지에서는 CDN을 통해 async하게 로딩됨. 여기서 설치하는 것은 Wrapper인 것 같다.)
bash
npm install @ffmpeg/ffmpeg @ffmpeg/core
  • 그 다음 snowpack을 설치한다.
bash
npm install snowpack --save-dev
  • 다음 명령어로 테스트 가능하다. snowpack을 위 명령어로 설치하는 대신 npm i -g snowpack으로 글로벌하게 설치했다면 snowpack dev를 하면 된다.
bash
npm start
  • src/App.jsx
jsx
import  { useState, useEffect } from 'react'
import './App.css'

import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg'
const ffmpeg = createFFmpeg({ log: true })

function App() {
  const [ready, setReady] = useState(false)
  const [video, setVideo] = useState()
  const [gif, setGif] = useState()

  const load = async () => {
    await ffmpeg.load()
    setReady(true)
  }

  useEffect(() => {
    load()
  }, []) // blank [] makes it run once.

  const convertToGif = async () => {
    // Write the file to memory
    ffmpeg.FS('writeFile', 'test.mp4', await fetchFile(video))

    // Run the FFMpeg command
    await ffmpeg.run(
      '-i', // input flag
      'test.mp4', // video source input
      '-t', // time flag
      '2.5', // for 2.5 seconds
      '-ss', // starting secont flag
      '2.0', // offset for 2 seconds
      '-f', // file
      'gif', // encode as gif file
      'out.gif' // write file to out.gif
    )

    // Read the result
    const data = ffmpeg.FS('readFile', 'out.gif')

    // Create a URL
    const url = URL.createObjectURL(new Blob([data.buffer], { type: 'image/gif' }))
    setGif(url)
  }

  return ready ? (
    <div className="App">
      {video && <video controls width="250" src={URL.createObjectURL(video)}></video>}
      <input type="file" onChange={(e) => setVideo(e.target.files?.item(0))} />
      <h3>Result</h3>
      <button onClick={convertToGif}>Convert</button>
      {gif && <img src={gif} width="250" />}
    </div>
  ) : (
    <p>Loading...
  )
}

export default App
  • FFMpeg는 in-memory file system을 사용한다.
  • 다음과 같은 형태의 JS 문법을 사용하여 gif가 JS 기준 false(null, undefined, false...)가 아닐 때만 렌더링되도록 만들 수 있다.
jsx
{
  gif && <img src={gif} width="250" />;
}

GitHub Pages에 Snowpack App 호스팅 및 시행착오

  • 으로 GitHub Pages에 띄우려고 했다. 그런데 _dist_ 폴더의 index.html에서 404 Not Found가 발생했다.
  • 빌드하면서 docs 폴더 및 build 폴더를 초기화하는 스크립트 추가 (기존 방식에서도 포함하고 있는 기능인데 처음에는 단순히 폴더명을 build에서 docs로 바꾸는 기능만 넣고 이 부분을 포함하지 않았다.) 문제가 해결되지 않았다.
  • gh-pages를 사용해보았다. 문제가 해결되지 않았다.
  • 그 다음 touch docs/.nojekyll해보았다. 작동하지 않았다. (나중에 알게 됐지만 이게 해결책이었다. GitHub Pages가 Environment 탭에서는 Deploy 되었다고 나타나는데 반해 실제로는 업데이트되지 않아서 이게 해결책이 아닌 줄 알았다.)
  • 또 다음과 같이 snowpack.config.js에서 baseUrl을 변경해주었다. (이것도 필요한 해결책이었다. 나의 GitHub Pages는 subdirectory에 호스팅하기 때문에 이와 같은 옵션이 필요하다. 참고 링크 1, 참고 링크 2)
js
buildOptions: {
  baseUrl: '/ffmpeg-wasm-gif-converter-study/',
},
  • Production 폴더의 _dist_ 디렉토리의 이름을 static으로 변경했다. 이는 snowpack.config.js에서 다음 코드를 변경함으로써 가능하다. (실제로는 불필요한 변경이었다.)
js
mount: {
  public: '/',
  src: '/static',
},
  • 이는 또한 public/index.html에서 src를 변경해주었다. 위의 Discussion Post들을 볼 때 여기를 %PUBLIC_URL%으로 해야하는 것 같은데, 일단 ./static/index.js을 사용했다. 이를 통해서 index.html은 로딩되었다.
html
<script type="module" src="./static/index.js"></script>
  • 하지만 여전히 _snowpack_ 폴더 내부의 파일이나 web_modules 폴더 내의 결과물은 404 Not Found 상태였다.
  • 이때부터 GitHub Pages가 _ 폴더를 인식하지 못한다는 것을 알게 되었다.
  • 약간의 조사를 해 보니 GitHub Pages에 기본으로 포함된 Jekyll 전처리 기능 때문이라는 것을 알게 되었다. 참고 링크
  • 때문에 다시 .nojekyll 파일을 추가해보았다. npm run build 명령어를 다시 수정해 다음 명령어를 추가했다. 이를 통해 프로젝트를 build할 때마다 자동으로 .nojekyll 파일이 추가되도록 만들었다.
bash
... && touch docs/.nojekyll
  • 여전히 문제가 발생했다. 조사를 해보니 GitHub Pages가 Environment 탭에서는 Deploy 되었다고 나오는데 실제로는 업데이트되는데 시간이 더 걸리는 문제인 것 같았다. 참고 링크
  • 웹앱의 title도 바꿔봤는데 Production 웹사이트에서는 변경되지 않는 것을 볼 때 업데이트에 약간의 시간이 걸리는 것이라고 판단했다.
  • 웹앱이 업데이트되고 난 후 _snowpack_/env.js가 정상적으로 로딩됨을 확인했다. 하지만 여전히 web_modules는 404 Not Found가 나타났다.
  • create-snowpack-app을 쓸 경우 .gitignore에 web_modues가 추가되는 문제 때문이었다. 원래 web_modules는 GitHub에 node_module처럼 안 올라가야 맞는데, 지금의 경우에는 GitHub을 CDN처럼 활용하는 것으므로 web_modules가 필요하다.
  • 정상적으로 동작함을 확인했다.
  • 다만 Safari와 에서는 작동되지 않았다. " is not defined"이라는 오류가 발생했다.
  • 조사해본 결과 ffmpeg.wasm은 현재 Chrome에서만 동작하기 때문이라고 한다 (참고 링크 1.) ffmpeg.wasm 공식 데모 사이트에 Safari나 로 접근하면 다음 오류가 나타난다.

Your browser doesn't support , thus ffmpeg.wasm cannot execute. Please use latest version of Chromium or any other browser supports .

해결책 정리

Create-Snowpack-App을 GitHub Pages에 올리기 위해서는 다음을 해야한다.

  • 빌드 결과물에 .nojekyll 파일 추가하기
  • snowpack.config.js에 buildOptions.baseUrl 추가하기
  • GitHub Pages는 업데이트에 시간이 조금 걸리니 충분히 기다리기
  • ffmpeg.wasm은 Chrome을 사용해 구동하기 (2020/11 기준)

완성본

아쉬운 점

  • Random Commit이 많았다. GitHub Pages에 정상적으로 결과가 반영되는지를 확인하기 위해 일단 업로드해야했기 때문이다. 결과적으로 GitHub의 설정 (.nojekyll 등) 때문에 오류가 발생됐던 것이라 불가피했다고 생각한다.
Backlinks1