Skip to content

Instantly share code, notes, and snippets.

@oakasapoglu
oakasapoglu / saveToGist.js
Last active April 22, 2026 00:56
Oasis Buffer Backup
// Cmd+E: Load init.js from Gist
// Cmd+Enter: eval current line or selection
// --- Gist/URL to Buffer Loader ---
async function loadGistToBuffer() {
const url = prompt("Paste GitHub Raw or Gist URL:");
if (!url) return;
try {
// Ensure we are hitting the 'raw' version if it's a standard Gist link
@oakasapoglu
oakasapoglu / init.js
Last active April 23, 2026 00:32
Monaco editor init file
// Quick comment toggle with Ctrl+/
monaco.editor.addKeybindingRule({
keybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.Slash,
command: 'editor.action.commentLine'
});
" =============================================================================
" line2file.vim - Append current line or visual selection to a target file
" =============================================================================
" Author: Ömer Kasapoğlu
" Description:
" Primitive Vim plugin to quickly append text to a file.
" Features:
" - Append the current line to a target file
" - Append contents of a register (optional)
" - Yank visual selection to a register for later appending