This small Sublime Text plugin adds three commands:
- Insert current date →
YYYY-MM-DD - Insert current time →
hh:mm(24-hour) - Insert date + time →
YYYY-MM-DD hh:mm
Works both for inserting and replacing a selection.
| #!/usr/bin/env python3 | |
| """ | |
| smartpatch.py — conservative fuzzy patch applier for AI-made unified diffs. | |
| Design goal: | |
| Treat AI diffs as intent packets, not as mechanically exact Git patches. | |
| Ignore unreliable hunk line numbers. Prefer exact content/context matches. | |
| Apply only when confidence is high enough. Report everything else. | |
| Safe default: |
| #!/usr/bin/env python3 | |
| test_value = 116 | |
| divisor = 60 | |
| # Pythonic (best) | |
| minutes, seconds = divmod(test_value, divisor) | |
| print(f"Pythonic: {minutes}:{seconds}") | |
| # C-Style (good) | |
| minutes = test_value // divisor |
This guide helps standardize project documentation and developer logs for clarity, consistency, and searchability.
Use it to keep technical writing concise, readable, and easy to grep.
All files should be named for maximum searchability and sorting.
Stick to this format:
| function home { set-location "~" } | |
| Set-Alias vim nvim | |
| # Create a command similar to Linux `touch` | |
| function touch { | |
| Param( | |
| [Parameter(Mandatory=$true)] | |
| [string]$Path | |
| ) |
| #!/usr/bin/python3 | |
| from sseclient import SSEClient | |
| import json | |
| from math import sqrt | |
| import winsound # NOTE: Windows only | |
| from datetime import datetime, timezone, timedelta | |
| ''' | |
| Version 2.1 (2023-07-07): A small script that alerts the user of lightning if it strikes within 16 km (10 miles) of your home position in the Nordics. | |
| Based on lightning observations broadcast as SSE from The Norwegian Meteorological Institute, https://www.met.no/. |
| #!/usr/bin/python3 | |
| from sseclient import SSEClient | |
| import json | |
| # get the stream | |
| thundercloud = SSEClient('https://lyn.met.no/events') | |
| # keep checking for new lighning strikes | |
| for lightning in thundercloud: |
| <!DOCTYPE html> | |
| <html class="no-js" lang="eng"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content="Order Formatting App"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- <link rel="stylesheet" href="css/main.css"> --> | |
| <style type="text/css"> |
| CREATE (h:Module { | |
| name: "Air Filtering Unit I", | |
| requirements: [ | |
| '$10,000', | |
| 'Generator III', | |
| 'Vents III', | |
| 'Skier III' | |
| ], | |
| functions: [ | |
| "Group of skills levelling boost: Physical, +40%" |
| "source":"https://www.vg.no/spesial/2020/corona/", | |
| "events":[ | |
| {"2020-03-13":"Change of test criteria"}, | |
| {"2020-03-26":"NIPH (FHI) uses MSIS data"}, | |
| {"2020-04-20":"Partial reopening of kindergartens and hair dressers"} | |
| ], | |
| "majorReCheckOfDataset":["2020-04-03"], | |
| "lastUpdated":["2020-04-03", "2020-04-08", "2020-04-17", "2020-04-21"], | |
| "coronaTestDataForNorway": [ | |
| { |