Skip to content

Instantly share code, notes, and snippets.

View loclv's full-sized avatar
πŸ₯•
learning

loclv loclv

πŸ₯•
learning
View GitHub Profile
@shawnyeager
shawnyeager / opencode-systemd-tailscale.md
Last active March 15, 2026 21:41
Run OpenCode as a persistent systemd service with Tailscale access

OpenCode Web Server Setup

Run OpenCode as a persistent background service, accessible from any device via Tailscale.

Why?

  • Access from anywhere β€” Start a task from your phone, check results from your laptop
  • Sessions persist β€” Close the browser, come back later, your session is still there
  • Multiple clients β€” Terminal TUI and browser can connect to the same session simultaneously
  • Survives crashes β€” systemd restarts the server automatically
@roninjin10
roninjin10 / zig-vs-rust-guillotine.md
Last active December 31, 2025 18:56
zig-vs-rust-guillotine

Zig vs. Rust When Building Guillotine

I started Guillotine in Rust, but quickly switched to Zig. This piece explains why in hindsight that was the right call.


TL;DR

  • Zig: fanatically explicit, zero hidden control flow/allocations, first-class C interop, powerful comptime for safety + customization, simple mental model for size/perf.
  • Rust: superb compiler and ecosystem, strong safety model, great tooling; but hidden control flow and panic/unwind mechanics make size/perf reasoning harder, and FFI ergonomics add ceremony.
@t3dotgg
t3dotgg / try-catch.ts
Last active March 10, 2026 03:34
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@ixahmedxi
ixahmedxi / settings.json
Created January 2, 2024 08:05
My settings.json
{
"workbench.startupEditor": "none",
"workbench.iconTheme": "moxer-icons",
"workbench.colorTheme": "Aura Dark",
"workbench.settings.editor": "json",
"breadcrumbs.enabled": false,
"explorer.compactFolders": false,
"editor.wordWrap": "bounded",
"editor.tabSize": 2,
"editor.inlineSuggest.enabled": true,
@insertish
insertish / React Native.md
Last active August 19, 2025 05:17
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
@ArcRanges
ArcRanges / gist.md
Last active March 18, 2025 03:33
aws-ec2-nextjs

Instructions to properly set up a production-ready NextJS App with AWS

This is a summary of how to start your own NextJS app, create the repo on Github, upload later in an AWS EC2 Instance and automate the process with AWS Codebuild, CodeDeploy, & CodePipeline.

After following these instructions you should be able to:

  • Create a NextJS App
  • Create an AWS EC2 instance
  • Be able to SSH to an EC2 instance
  • Prepare the instance as a Node environment
  • Configure Nginx service for proper routing
  • Configure domain and add SSL
@phortuin
phortuin / postgres.md
Last active August 18, 2025 04:04
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

@BcRikko
BcRikko / Skills
Last active September 12, 2024 16:15
JavaScript β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘ γͺかγͺか Pretty Good
HTML β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ まあまあ Not Bad
CSS β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘ そこそこ Alright
Vue.js β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘ γγ‚Œγͺγ‚Š Good
Muscle β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ γ‚ˆγ‚γ‚ˆγ‚ Weak
Guitar β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘ γ€γ‚ˆγ€γ‚ˆ Strong
Description: >
Script to create a SSL certificate, S3 bucket and Cloudfront distribution.
###############################################################################
Parameters:
###############################################################################
DomainName:
Type: String
Description: The domain name.
@IlyaKisil
IlyaKisil / OSX_writing_to_ntfs.md
Last active December 21, 2025 14:45
Free NTFS read and write solutions

Free NTFS read and write solutions

Mac OS does not support writing to NTFS disk by default. Here is a simple work around to enable NTFS Read/Write support.

  1. Identify either <NAME> or <Universal_Unique_Identifier> of your external device, e.g. use Disk Utility.
  2. Type in terminal
    sudo nano /etc/fstab
    
  3. Add the line that does a trick: