Skip to content

Instantly share code, notes, and snippets.

@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@yifanzz
yifanzz / notepad.md
Created October 22, 2024 10:58
Cursor AI - Playwright Notepad

Playwright E2E Testing Guidelines

Test Structure and Organization

  • Store all tests under the tests/ folder
  • Name test files based on the system component being tested (conceptual, not React component)
  • Group related tests within a single file using test.describe blocks
  • Use descriptive test names that explain the functionality being tested
  • use test.use({storageState: ...}) for setting auth state across all test in the suite

Locator Strategy

@prologic
prologic / LearnGoIn5mins.md
Last active January 13, 2026 22:47
Learn Go in ~5mins
helm install <RELEASE_NAME> stable/external-dns \
--set provider=aws \
--set domainFilters[0]=<DOMAIN_FILTER>\
--set policy=sync \
--set registry=txt \
--set txtOwnerId=<HOSTED_ZONE_ID> \
--set interval=3m \
--set rbac.create=true \
--set rbac.serviceAccountName=external-dns \
--set rbac.serviceAccountAnnotations.eks\.amazonaws\.com/role-arn=<ROLE_ARN>
@stevenringo
stevenringo / reinvent-2017-youtube.md
Created December 3, 2017 23:01
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@evanj
evanj / Dockerfile
Last active May 6, 2020 06:06
connectbug: Make lots of outbound connections to cause DNS errors in Kubernetes. See https://github.com/kubernetes/kubernetes/issues/45976
FROM python:2.7.13-slim
COPY . /app/
WORKDIR /app
ENTRYPOINT ["python", "connectbug.py"]
@asdf8601
asdf8601 / aux_functions.py
Last active September 14, 2018 00:15
trailing_month_returns
# useful functions
# ================
def total_return(prices):
"""Retuns the return between the first and last value of the DataFrame.
Parameters
----------
prices : pandas.Series or pandas.DataFrame
Returns
-------
total_return : float or pandas.Series
@PyDataBlog
PyDataBlog / S&P 500.ipynb
Created September 13, 2017 08:14
A tutorial for scraping information of all the S&P 500 listed companies
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@posener
posener / go-shebang-story.md
Last active December 31, 2025 16:17
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@mrry
mrry / tensorflow_self_check.py
Last active September 26, 2024 15:39
[DEPRECATED] TensorFlow on Windows self-check
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,