Skip to content

Instantly share code, notes, and snippets.

@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@seachai
seachai / gist:948ed1eeafa32ce03db6685edb879f71
Last active January 6, 2025 17:27
iTerm 2 Natural Text Editing Preset
On iTerm2 - Open Preferences > Profiles > Keys > Key Mappings > Presets > Select Natural Text Editing
- You can move a word backwards using Option ⌥ + ← and a word forwards using Option ⌥ + →
- Move to the start of the line using fn + ← and to the end of the line with fn + →.
- Also you can delete a word backwards using Option ⌥ + ⌫, delete the whole line using Command ⌘ + ⌫.
If the preset doesn't appear, reinstall iTerm2. If you installed it using Homebrew + Cask:
brew cask reinstall iterm2
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 6, 2025 17:27
"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
@Klerith
Klerith / pasos-node-typescript.md
Last active January 6, 2025 17:21
Configurar proyecto de Node con TypeScript

Pasos para usar Node con TypeScript con Nodemon

Más información - Docs Oficiales

  1. Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
  1. Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
@nunofgs
nunofgs / README.md
Last active January 6, 2025 17:21
Use any RTSP camera with Prusa Connect

I use a cheap Tapo C100 webcam to monitor my 3D prints. It supports RTSP.

Screenshot 2023-07-17 at 23 26 34

Instructions

  1. Go to the Cameras section at https://connect.prusa3d.com
  2. Add a new camera.
  3. Click the QR code link
  4. Click "Start Camera"
@izabera
izabera / recursive_exp.md
Last active January 6, 2025 17:19
recursive expansions

for the latest chapter of what's becoming a blog on the most cursed bash you can imagine, let's do some maths together

euclid's algorithm for gcd could be written like this in python:

>>> def gcd(a, b):
...     if b:
...         return gcd(b, a%b)
... return a
@Luthaf
Luthaf / Foo.cpp
Last active January 6, 2025 17:17
Calling C++ from Fortran
#include "Foo.hpp"
#include <iostream>
using namespace std;
Foo::Foo(int _a, int _b): a(_a), b(_b){
cout << "C++ side, constructor" << endl;
}
Foo::~Foo(){
@canadaduane
canadaduane / dlight-plugin.ts
Created January 5, 2025 23:09
Bun loader for DLight
import type { BunPlugin } from "bun";
import { transform } from "@babel/core";
import dlight, { type DLightOption } from "babel-preset-dlight";
export const dlightPlugin: BunPlugin = {
name: "DLight loader",
setup(build) {
build.onLoad({ filter: /\.view\.[tj]s$/ }, async (args) => {
const options: DLightOption = {};
@crshnbrn66
crshnbrn66 / user-profile.psm1
Last active January 6, 2025 17:16 — forked from MSAdministrator/Create-NewProfile.ps1
PowerShell functions to create a new user profile
<#
.Synopsis
Rough PS functions to create new user profiles
.DESCRIPTION
Call the Create-NewProfile function directly to create a new profile
.EXAMPLE
Create-NewProfile -Username 'testUser1' -Password 'testUser1'
.NOTES
Created by: Josh Rickard (@MS_dministrator) and Thom Schumacher (@driberif)
@zedauni
zedauni / Generate JWT key pair.md
Created November 10, 2024 18:08
Generate JWT key pair

GENERATE JWT KEY PAIR

KEEP YOUR PRIVATE KEY SECURE AND DO NOT SHARE IT PUBLICLY.

With openssl

Private Key

openssl genrsa -out private.pem 4096 # It is recommended to use a minimum of 2048

Public Key

openssl rsa -in private.pem -pubout -outform PEM -out public.pem