Skip to content

Instantly share code, notes, and snippets.

@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active November 27, 2026 08:33
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@karpathy
karpathy / microgpt.py
Last active November 27, 2026 08:27
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
// ==UserScript==
// @name Telegram Script
// @author thefabledowl@gmail.com
// @version 0.3
// @description Greasemonkey script to extract users/history
// @author You
// @downloadUrl https://gist.github.com/fabledowl/4d6f84b211a2918fb9ee9556550df5b0/raw/telegramScript.user.js
// @updateUrl https://gist.github.com/fabledowl/4d6f84b211a2918fb9ee9556550df5b0/raw/telegramScript.user.js
// @include https://web.telegram.org/*
// @grant none
@sunmeat
sunmeat / MainActivity.java
Created November 27, 2026 08:19
material 3 dialog
package dev.sunmeat.myapplication;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.InputType;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.Window;

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@kevin-brown
kevin-brown / control-structures.md
Last active November 27, 2026 08:12
Examples of syntax for the Jinja templating language

for

Basic with list

<h1>Members</h1>
<ul>
{% for user in users %}
  <li>{{ user.username|e }}</li>
{% endfor %}
@dmattera
dmattera / launchctl_man_pages.md
Last active November 27, 2026 08:07
macOS man page entries for launchctl services

This list was auto-generated on macOS 10.15 (Catalina) using a script that did the following:

  1. grabbed the name of all the .plist files located in the 5 folders used by launchctl:
  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System wide daemons provided by the administrator.
  • /System/Library/LaunchAgents OS X Per-user agents.
  • /System/Library/LaunchDaemons OS X System wide daemons.
@rz6agx
rz6agx / MTProto.md
Last active November 27, 2026 08:06
Telegram MTProto Proxy on Ubuntu server

Telegram MTProto Proxy на Ubuntu server

MTProto — протокол разработанный командой Дурова предназначенный для шифрования трафика мессенджера Telegram. MTProto Proxy — промежуточный сервер, выполняющий роль посредника между пользователем и целевым сервером позволяя получать доступ к сервису если по каким-то причинам он недоступен скрывая свой IP адрес и маскируя трафик. Установить Telegram MTProto Proxy проще на своем сервере (арендовав минимальный VPS за рубежом), собрав его из исходников, благо распространяется он по открытой лицензии и доступен на Github. Для установки нам понадобится общий набор инструментов для сборки из исходного кода и пакеты разработки для openssl и zlib.

apt install git curl build-essential libssl-dev zlib1g-dev

Клонируем из репозиторий Telegram MTProto Proxy на GitHub и компилируем:

@rz6agx
rz6agx / Remote-dev-VSCode.md
Created February 19, 2025 07:27
Удалённая разработка с VS Code в браузере

Удалённая разработка с VS Code в браузере

Code Server выполняет Visual Studio Code на удалённом сервере, доступном через браузер.

Зачем мне это нужно?

  • Согласованная среда: вы можете писать код на хромбуке, планшете или ноутбуке с согласованной средой разработки, пользуясь "домашними" настройками.
  • Мультиплатформенность: все преимущества VS Code будут доступны из любого браузера, включая планшеты.
  • Производительность сервера: вы можете пользоваться возможностями крупных облачных серверов для ускорения тестов, компиляции, загрузок и прочего. С помощью DigitalOcean сервера могут быть масштабированы до любого размера.
  • Экономия заряда батареи: вы сэкономите энергию заряда, т.к. все вычисления будут производиться на сервере.

Настройка

@Mr-Precise
Mr-Precise / vs_buildtools_dl_list.md
Last active November 27, 2026 07:52
MSVC / VS / Buildtools download link collection list