Skip to content

Instantly share code, notes, and snippets.

View t-lock's full-sized avatar

Timothy Wheelock t-lock

View GitHub Profile
@t-lock
t-lock / claude-funny.md
Last active March 26, 2025 04:53
Claude goes off the rails

Prompt

        // Optional: Only include posts that have at least one 'activities' term
        $tax_query = array(
            'relation' => 'OR',
            array(
                'taxonomy' => 'activities',
                'operator' => 'EXISTS'
 ),
@t-lock
t-lock / git-workflow.md
Last active December 5, 2024 03:30
AoB Git workflow for contractors

Note "The main branch" in the following text refers to either "master" or "develop" depending on the project.

  1. Start your feature branch from the latest on the main branch.
  2. Make commits along the way which represent cohesive chunks of functionality. This can be a single commit for a feature, or multiple commits if necessary. Please utilize git commit --amend and or git rebase HEAD~<n> -i to keep history clean and orderly to the best of your ability.
  3. Rebase off the main branch frequently to make sure you are getting upstream changes. Ex: git fetch && git rebase origin/master -- Fix any conflicts as they arrive during this process.
  4. Open a PR when the feature is ready, but always rebase again before making the PR.
  5. If changes are requested: make the changes and rebase again (there will often be new work in the main branch after code review, because we code review multiple PRs at the same time, and some will be merged). Note: A force push may be required to get the new changes up to
@t-lock
t-lock / useMocks.js
Last active April 24, 2020 08:03
helper for mocking responses in puppeteer
export async function useMocks(page, mocks) {
await page.setRequestInterception(true);
page.on("request", async (request) => {
if (request.postData() && JSON.parse(request.postData()).operationName) {
const mock = mocks.find(
(mock) => mock.name === JSON.parse(request.postData()).operationName
);
if (mock) {
await delay(500);
request.respond({