Skip to content

Instantly share code, notes, and snippets.

View geocine's full-sized avatar
🤖
지식은 행동으로 번성하고, 게으르면 시들어간다.

Aivan Monceller geocine

🤖
지식은 행동으로 번성하고, 게으르면 시들어간다.
View GitHub Profile

Terminal Emulator Specification

Overview

A sandboxed terminal emulator that simulates a Unix-like file system environment with core file manipulation commands, implemented entirely in memory without affecting the host system.

Core Architecture

1. Virtual File System (VFS)

  • In-memory file system with directory tree structure
  • Support for files and directories
@geocine
geocine / borrow-checker-rust.md
Last active August 30, 2025 14:04
Understanding the Rust Borrow Checker and Use-After-Free

Understanding the Rust Borrow Checker and Use-After-Free

As someone familiar with JavaScript, Python, C#, and Go, you're about to encounter Rust's unique approach to memory safety through its borrow checker. Understanding this concept requires first grasping what problems it solves, particularly the dangerous "use-after-free" vulnerability.

What is Use-After-Free?

Use-after-free (UAF) is a critical memory safety vulnerability that occurs when a program continues to use a memory location after it has been freed or deallocated. This creates what's called a dangling pointer - a pointer that still references a memory address that no longer contains valid data. [^1][^2][^3][^4]

Here's a simple example in C that demonstrates the problem:

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
@geocine
geocine / libre.md
Created April 4, 2024 04:44
[OPINION] No such thing as a free lunch: The Filipino ‘libre’ culture

[OPINION] No such thing as a free lunch: The Filipino ‘libre’ culture

Jul 13, 2019 10:00 AM PHT

Jade Harley Bretaña

Has the Filipino tradition of gift-giving and treating friends and family gone too far?

Different parts of the world consider generosity as a virtue. In fact, British organization Charities Aid Foundation even has a World Giving Index, which ranks countries based on 3 giving behaviors: volunteering time, helping a stranger, and donating money.

@geocine
geocine / environment.yaml
Last active January 10, 2023 12:21
ST Environment
name: ST
channels:
- conda-forge
- defaults
dependencies:
- aom=3.5.0=h63175ca_0
- blosc=1.21.3=hdccc3a2_0
- bzip2=1.0.8=h8ffe710_4
- c-blosc2=2.6.1=h183a6f4_0
- ca-certificates=2022.12.7=h5b45459_0
@geocine
geocine / convert_original_stable_diffusion_to_diffusers_fix.py
Created December 26, 2022 18:50
convert_original_stable_diffusion_to_diffusers_fix.py
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
@geocine
geocine / mouse.md
Last active December 5, 2022 11:34
Mouse Move
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;

namespace WpfApp
{
  public partial class MainWindow : Window
  {
@geocine
geocine / ua
Created September 26, 2022 08:00
ua
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
@geocine
geocine / GameUserSettings.ini
Created December 6, 2021 00:37 — forked from azmodius/GameUserSettings.ini
Valorant User Settings (windowed mode for UltraWides)
# Found in...
# C:\Users\<user>\AppData\Local\VALORANT\Saved\Config\<some guid>\Windows\GameUserSettings.ini
[/Script/ShooterGame.ShooterGameUserSettings]
DefaultMonitorDeviceID="MONITOR\\GSM774A\\{4d36e96e-e325-11ce-bfc1-08002be10318}\\0011"
DefaultMonitorIndex=0
LastConfirmedDefaultMonitorDeviceID="MONITOR\\GSM774A\\{4d36e96e-e325-11ce-bfc1-08002be10318}\\0011"
LastConfirmedDefaultMonitorIndex=0
bShouldLetterbox=True
bLastConfirmedShouldLetterbox=True
@geocine
geocine / remove-all-global-yarn.md
Created February 13, 2021 18:43
Remove all global yarn
yarn global remove $(yarn global list | grep info | sed 's/^info "\(.*\)@.*".*$/\1/')