Skip to content

Instantly share code, notes, and snippets.

View t-mart's full-sized avatar

Tim Martin t-mart

View GitHub Profile
@t-mart
t-mart / VSCode Navigation Cheatsheet.md
Last active April 10, 2025 20:41
Windows VSCode Navigation Cheatsheet
@t-mart
t-mart / cheatsheet.md
Last active March 23, 2025 04:03
Tailwind v4 Syntax Cheatsheet

Tailwind v4 Syntax Cheatsheet

Tailwind v4 has new syntax for arbitrary values, variants, properties, and more. Here's the cheatsheet that I would have wanted when I first started using it.

Terms Primer

  • Property: Indicates an aspect of the appearance or layout of an element, such as margin or color. Are set to a value.
  • Custom Property (or CSS Variables): A property that is user-defined
kinesis = boto3.client(
'kinesis',
region_name=awsRegion,
aws_access_key_id=accessKeyId,
aws_secret_access_key =secretAccessKey
)
function getEntriesFromAElements(element) {
return element.querySelectorAll('a')
.map(e => ({ e.text : e.getAttribute('href') } ));
}
@t-mart
t-mart / lol.py
Created September 28, 2019 21:55
for i in range(5):
print(i)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# create a list of 2d indices of A in decreasing order by the size of the
# (real) entry of A that they index to
def sortedIndices(A):
indexList = [(i,j) for i in range(A.shape[0]) for j in range(A.shape[1])]
indexList.sort(key=lambda x: -A[x])
return np.array(indexList)
@t-mart
t-mart / README.md
Created December 4, 2018 16:41
xmlto does not validate xmlto: Fix document syntax or use --skip-validation option I/O error : Attempt to load network entity dtd warning: failed to load external entity D DocBook XML V4.5//EN"

Problem

When compiling git from source, I often run into this problem:

% make prefix=$HOME all doc info
    SUBDIR git-gui
    SUBDIR gitk-git
    SUBDIR templates
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Documentation all
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- http:
paths:
- path: /
backend: