Skip to content

Instantly share code, notes, and snippets.

@ConnerWill
ConnerWill / ANSI-escape-sequences.md
Last active January 18, 2025 19:00
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 18, 2025 19:00
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active January 18, 2025 18:58
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@dehsilvadeveloper
dehsilvadeveloper / 0_prerequisites.md
Last active January 18, 2025 18:53
Installing Docker on WSL 2 with Ubuntu 22.04

Installing Docker on WSL 2 with Ubuntu 22.04

Instalando Docker em um WSL 2 com Ubuntu 22.04

Prerequisites

Before start the installation process, make sure you meet the following prerequisites:

  • A Windows 10 operating system with WSL 2 support.
  • WSL 2 enabled.
  • Ubuntu 22.04 installed on WSL 2.
@ELI7VH
ELI7VH / react-context-boilerplate.tsx
Last active January 18, 2025 18:51
React Context Boiler Plate - Typescript
import React, { createContext, useContext, useState, useEffect } from "react"
type Props = {
children: React.ReactNode
}
type Context = {
count: number
increment: () => void
}
@achinaou
achinaou / FlywayTestAspect.scala
Last active January 18, 2025 18:50
Flyway ZIO Test Aspect
import java.util.function.UnaryOperator
import javax.sql.DataSource
import org.flywaydb.core.Flyway
import org.flywaydb.core.api.configuration.FluentConfiguration
import org.flywaydb.core.api.output.MigrateResult
import zio.*
import zio.test.TestAspect
object FlywayTestAspect:
@p7cq
p7cq / Arch_Linux_Root_On_ZFS.md
Last active January 18, 2025 18:49
Install Arch Linux with Root on ZFS

Arch Linux Root on ZFS

Installation steps for running Arch Linux with root on ZFS using UEFI and systemd-boot. All steps are run as root.

Requires an Arch Linux image with ZFS built-in (see References).

In live environment

If using KVM, add a Serial number for each virtual disk and reboot the VM. The disks should now be available in /dev/disk/by-id as virtio-<Serial>.

@speric
speric / gist:6096965
Created July 28, 2013 01:20
vimtutor Lesson Summaries
Lesson 1 SUMMARY
1. The cursor is moved using either the arrow keys or the hjkl keys.
h (left) j (down) k (up) l (right)
2. To start Vim from the shell prompt type: vim FILENAME <ENTER>
3. To exit Vim type: <ESC> :q! <ENTER> to trash all changes.
OR type: <ESC> :wq <ENTER> to save the changes.
@achinaou
achinaou / PostgreSQLContainer.scala
Last active January 18, 2025 18:49
PostgreSQL Test Container ZIO Layer
import java.sql.Connection
import javax.sql.DataSource
import org.postgresql.ds.PGSimpleDataSource
import org.testcontainers.containers.PostgreSQLContainer as OriginalPostgreSQLContainer
import zio.*
class PostgreSQLContainer(dockerImageName: String)
extends OriginalPostgreSQLContainer[PostgreSQLContainer](dockerImageName)
@DrSensor
DrSensor / Advanced Markdown Tricks.md
Last active January 18, 2025 18:46
Advanced Markdown Tricks

Repository

What Will I Learn?

In general, you will learn some markdown tricks combined with standard HTML tags. In more details what you will learn:

  • Hide-show content
  • Writing codeblocks inside codeblocks
  • Combining and using italic, bold, superscript, subscript, and/or strikethrough
  • Quoting long sentence (using nested blockquotes)