See the new site: https://postgresisenough.dev
| ╭─── Claude Code v2.1.12 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ | |
| │ │ Tips for getting started │ | |
| │ Welcome back Jonny! │ Run /init to create a CLAUDE.md file with instructions for Claude │ | |
| │ │ │ | |
| │ │ ───────────────────────────────────────────────────────────────── │ | |
| │ ▐▛███▜▌ │ Recent activity |
| import re | |
| from re import Pattern | |
| from typing import Dict, Any, cast | |
| from pydantic.utils import update_not_none | |
| from pydantic.validators import constr_length_validator | |
| class RFC3986Regex: | |
| ALPHA: Pattern = r"[a-zA-Z]" |
This is a collection of the tweaks and modification I've made to my Arch Linux installation over the months. These may be applicable to other distros, but please check first before doing anything. I also included Arch Wiki references for all the procedures I mentioned. My recommendation is not to blindly follow this gist but to always check with the Arch Linux wiki first. Things move fast and by the time you're reading this my gist may be out of date. Lastly, the golden rule: never execute a command you don't understand.
My current DE of choice is KDE's Plasma. I find it just about perfect.
There are various ways to install it on Arch. The most popular one is to install plasma and plasma-applications, but I don't like doing that because it comes with too many programs I'll never use. I, instead, install the base plasma group, remove the few extra packages that come with it, then I finish off by installing a few KDE apps that don't come with th
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
| def get_count(q): | |
| count_q = q.statement.with_only_columns([func.count()]).order_by(None) | |
| count = q.session.execute(count_q).scalar() | |
| return count | |
| q = session.query(TestModel).filter(...).order_by(...) | |
| # Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ... | |
| print q.count() |
See Also:
| Level | Score | Regex | Credit |
|---|
| # Step 1: Set priveleges | |
| $ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all | |
| Starting... | |
| Setting allow all users to YES. | |
| Setting all users privileges to 1073742079. | |
| Done. | |
| # Step 2: Allow VNC clients |
| # -*- coding: utf-8 -*- | |
| import unicodedata | |
| """ Normalise (normalize) unicode data in Python to remove umlauts, accents etc. """ | |
| data = u'naïve café' | |
| normal = unicodedata.normalize('NFKD', data).encode('ASCII', 'ignore') | |
| print normal | |