Skip to content

Instantly share code, notes, and snippets.

@pongloongyeat
pongloongyeat / py-elementary.py
Last active June 25, 2025 21:56
Using Granite with Python
import gi
gi.require_version("Gtk", "3.0")
gi.require_version("Granite", "1.0")
from gi.repository import Gtk
from gi.repository import Granite
class MyWindow(Gtk.Window):
def __init__(self):
@georgemandis
georgemandis / summary.md
Last active June 25, 2025 21:54
Summary of Andrej Karpathy’s Talk on Software and the Era of AI

Video for reference: https://www.youtube.com/watch?v=LCEmiRjPEtQ

Summary of Andrej Karpathy’s Talk on Software and the Era of AI:

  1. Software is Changing Rapidly: Karpathy observes that after decades of relative stability (software 1.0, written as explicit code), software development has fundamentally changed—twice in the last few years—ushering in a “new normal.”

  2. Software 1.0 vs. 2.0 vs. LLM Programming:

    • Software 1.0: Traditional hand-written code using programming languages.
  • Software 2.0: Programs where the “code” consists of neural network weights learned from data. Developers curate datasets and train models, rather than write rules directly.
@swillits
swillits / Keycodes.swift
Last active June 25, 2025 21:52
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active June 25, 2025 21:51
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@stancl
stancl / deploy.sh
Last active June 25, 2025 21:50
Deploy using GitHub actions and SSH to a VPS
#!/bin/sh
set -e
vendor/bin/phpunit
npm run prod
git add .
(git commit -m "Build frontend assets for deployment to production") || true
(git push) || true
@mattmc3
mattmc3 / modern_sql_style_guide.md
Last active June 25, 2025 21:50
Modern SQL Style Guide
layout author title revision version description
default
mattmc3
Modern SQL Style Guide
2019-01-17
1.0.1
A guide to writing clean, clear, and consistent SQL.

Modern SQL Style Guide

@a-c-m
a-c-m / reflection.md
Last active June 25, 2025 21:50
reflection.md - a way to have claude-code self improve its context.

You are an expert in prompt engineering, specializing in optimizing AI code assistant instructions. Your task is to analyze and improve the instructions for Claude Code. Follow these steps carefully:

  1. Analysis Phase: Review the chat history in your context window.

Then, examine the current Claude instructions, commands and config <claude_instructions> /CLAUDE.md /.claude/commands/*

@gabrielbarros
gabrielbarros / unicode-intervals.txt
Last active June 25, 2025 21:50
Unicode code point intervals (UTF-8, UTF-16BE and UTF-32BE)
UNICODE
• Basic plan: 63,488 valid code points
┌───────────────────┬─────────┬─────────┬─────────┬───────────────────┐
│ Interval │ UTF-8 │ UTF-16 │ UTF-32 │ Code points │
├───────────────────┼─────────┼─────────┼─────────┼───────────────────┤
│ U+0000..U+007F │ 1 byte │ 2 bytes │ 4 bytes │ 128 (ASCII) │
├───────────────────┼─────────┼─────────┼─────────┼───────────────────┤
│ U+0080..U+07FF │ 2 bytes │ 2 bytes │ 4 bytes │ 1,920 │
├───────────────────┼─────────┼─────────┼─────────┼───────────────────┤