Skip to content

Instantly share code, notes, and snippets.

View garywu's full-sized avatar
🌴
On vacation

Gary Wu garywu

🌴
On vacation
View GitHub Profile
@garywu
garywu / .cursorrules
Created May 31, 2025 22:08 — forked from boxabirds/.cursorrules
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@garywu
garywu / gist:bcb9259da58c1e70044355b77c9e1078
Created January 18, 2018 15:58
puppeteer resize browser
I'm using this code:
await page.setViewport({height, width});
// Window frame - probably OS and WM dependent.
height += 85;
https://github.com/GoogleChrome/puppeteer/issues/1183
// Any tab.
# for a date, returns 3 letter month and week number of the month
6/25/2017 -> JUN-W4
7/1/2017 -> JUN-W4
CONCATENATE(upper(text(A15-WEEKDAY(A15, 2)+1, "mmm")), "-W", INT((6+DAY(A15+1-WEEKDAY(A15-1)))/7))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@garywu
garywu / frequency_estimator.py
Created March 17, 2017 02:12 — forked from endolith/frequency_estimator.py
Frequency estimation methods in Python
from __future__ import division
from numpy.fft import rfft
from numpy import argmax, mean, diff, log
from matplotlib.mlab import find
from scipy.signal import blackmanharris, fftconvolve
from time import time
import sys
try:
import soundfile as sf
except ImportError:

This instruction is for mac only.

Installation

brew install rclone

Configuration

rclone config