Skip to content

Instantly share code, notes, and snippets.

@0xack13
0xack13 / opencode-kimi-setup.md
Created March 13, 2026 03:30 — forked from OmerFarukOruc/opencode-kimi-setup.md
OpenCode + Kimi For Coding (K2.5) Setup

OpenCode + Kimi For Coding (K2.5) Setup

1. Add credentials

opencode auth login
# Select "Kimi For Coding"
# Enter your API key (sk-kimi-...)
@0xack13
0xack13 / token_effeciency.md
Created March 11, 2026 16:16
token effeciency
  • Never re-read files you just wrote or edited. You know the contents.
  • Never re-run commands to "verify" unless the outcome was uncertain.
  • Don't echo back large blocks of code or file contents unless asked.
  • Batch related edits into single operations. Don't make 5 edits when 1 handles it.
  • Skip confirmations like "I'll continue..." Lust do it.
  • If a task needs 1 tool call, don't use 3. Plan before acting.
  • Do not summarize what you just did unless the result is ambiguous or you need additional input.
@0xack13
0xack13 / gm.md
Last active March 11, 2026 15:03
GM collections
// ==UserScript==
// @name         GitHub Full Clone Command Link
// @namespace    https://github.com/
// @version      1.1
// @description  Add a link that copies the full git clone command
// @match        https://github.com/*/*
// @grant        none
// ==/UserScript==
@0xack13
0xack13 / AnimationView.swift
Created March 4, 2026 06:35
swiftui examples
import SwiftUI
struct AnimationView: View {
@State private var isRecording = false
@State private var pulseScale: CGFloat = 1.0
@State private var pulseOpacity: Double = 0.6
var body: some View {
ZStack {
// Pulse rings
@0xack13
0xack13 / AsyncIO.md
Created February 20, 2026 14:54 — forked from chaelim/AsyncIO.md
Note on Async IO Programming

Async IO Programming


Design Pattern

  • Proactor
  • Proactor vs Reactor
  • The Reactor patterns involve synchronous I/O, whereas the Proactor pattern involves asynchronous I/O. In Reactor, the event demultiplexor waits for events that indicate when a file descriptor or socket is ready for a read or write operation. The demultiplexor passes this event to the appropriate handler, which is responsible for performing the actual read or write.
  • In the Proactor pattern, by contrast, the handler—or the event demultiplexor on behalf of the handler—initiates asynchronous read and write operations. The I/O operation itself is performed by the operating system (OS). The parameters passed to the OS include the addresses of user-defined data buffers from which the OS gets data to write, or to which the OS puts data read. The event demultiplexor waits for events t
@0xack13
0xack13 / 70-ec2-nvme-devices.rules
Created October 31, 2025 20:57 — forked from jalaziz/70-ec2-nvme-devices.rules
AWS EBS NVMe udev rules
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@0xack13
0xack13 / mount_aws_nvme_ephemeral.sh
Created October 31, 2025 20:56 — forked from fideloper/mount_aws_nvme_ephemeral.sh
Find, format, and mount an AWS Ephemeral NVMe disk within ec2 in user data
#!/usr/bin/env bash
###
## This mounts a (single) ephemral NVMe drive in an EC2 server.
## It's meant to be run once, within user-data
## For EBS drives (non-ephemeral storage), see: https://gist.github.com/jalaziz/c22c8464cb602bc2b8d0a339b013a9c4
#
@0xack13
0xack13 / config_aws_raid.sh
Created October 31, 2025 20:55 — forked from sgtoj/config_aws_raid.sh
Configure Raid for AWS Instance (NVME Supported)
#!/usr/bin/env bash
# ========================================================== configurations ===
RAID_NAME=ephemeral_raid
RAID_DEVICE=/dev/md0
RAID_MOUNT_PATH=/mnt/ephemeral
# =============================================================== functions ===

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"

Python libraries and tools to make your scripts suck less

If you're an SRE or DevOps engineer, you'll usually find yourself writing scripts to automate tasks. But a collection of scripts, probably written by different members of the team, with different standards and tools, will soon become unmaintainable and trigger conversations such as "Can the script do this?" or "How do I make this change?". Sometimes, you may even have those conversations with yourself because after a while you no longer understand your own code.

If you think of your scripts not so much as a set of commands run one after another but as command-line applications, which should meet certain standards and follow good coding practices, they'll become much more user-friendly and maintainable.

Disclaimers:

  • This list should be specially useful for people writing scripts from scratch. If you're working on a big project as a developer, it's likely that many of the tools I'll describe (or some alternative) are already in use. But if the