Skip to content

Instantly share code, notes, and snippets.

View ianva's full-sized avatar

ianva ianva

  • EF
  • Saltanat Balghymbayev St 69
View GitHub Profile
@entrepeneur4lyf
entrepeneur4lyf / windsurf-memories
Created March 8, 2025 16:43
Converted Cline Memory Management to Windsurf
# Windsurf Memory Bank
I am Windsurf, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.
## Memory Bank Structure
The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:
```mermaid
flowchart TD
@wong2
wong2 / README.md
Last active January 12, 2025 03:12
How to run Claude computer use demo on macOS

Note

It is necessary to give Terminal (or iTerm or whatever you use) the permission to control the computer. This can be done in System Settings ➔ Privacy & Security ➔ Accessibility.

Guide

  • Install cliclick for mouse & keyboard emulation
    • brew install cliclick
  • Clone Anthropic quickstart repo
    • git clone https://github.com/anthropics/anthropic-quickstarts.git
  • cd computer-use-demo
  • Replace computer-use-demo/computer_use_demo/tools/computer.py with the modified version below
@jamesfulford
jamesfulford / useTime.js
Last active December 13, 2022 09:07
useTime() React hook
//
// useTime hook
//
import { useEffect, useState } from 'react';
export const useTime = (refreshCycle = 100) => {
// Returns the current time
// and queues re-renders every `refreshCycle` milliseconds (default: 100ms)
const [now, setNow] = useState(getTime());
@shirakaba
shirakaba / setup.md
Last active February 7, 2025 20:29
Configuring Nexus as a private registry for npm packages

Get the details to connect to your Nexus-managed npm repository

Note: Nexus group repositories (good example in this StackOverflow question) are out of this tutorial's scope. In any case, deployment to group repositories is currently still an open issue for Nexus 3 (and not intended ever to be implemented in Nexus 2). Thus, it is assumed that we'll push & pull to/from the same repository, and ignore the idea of groups hereon in.

  1. Ask your sysadmin for a username & password allowing you to log into your organistation's Nexus Repository Manager.

  2. Test the login credentials on the Nexus Repository manager at: http://localhost:8081/nexus/#view-repositories (localhost in our case is replaced by a static IP, and can only be connected to over VPN). If your organisation requires a VPN to connect to it, connect to that VPN before proceeding with this tutori

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 25, 2025 09:20
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@thorsten
thorsten / setUserAgent.js
Created May 9, 2016 15:12
Override user agent on all browsers
function setUserAgent(window, userAgent) {
// Works on Firefox, Chrome, Opera and IE9+
if (navigator.__defineGetter__) {
navigator.__defineGetter__('userAgent', function () {
return userAgent;
});
} else if (Object.defineProperty) {
Object.defineProperty(navigator, 'userAgent', {
get: function () {
return userAgent;
@paullewis
paullewis / requestIdleCallback.js
Last active April 23, 2025 04:07
Shims rIC in case a browser doesn't support it.
/*!
* Copyright 2015 Google Inc. 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
@paulirish
paulirish / what-forces-layout.md
Last active April 24, 2025 09:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@rsms
rsms / 0 input.js
Last active November 15, 2020 04:51
Pattern-matching parse-time macros for Babel
macro { mul(...$args) sdf } -> { [not_matched, $args] }
macro { mul(...$args) } -> { [matched, $args] }
macro { foo $a x ...$b y } -> { mul($a, $b) + 3 }
lol()
console.log( foo 1 x 2, 3 y, 6 )
@roman01la
roman01la / index.jsx
Created July 30, 2015 14:03
Maybe monad in React
// this will fail on if there's no data
React.createClass({
render() {
return <div>renderComplexWidget(this.props.data)</div>;
}
});
// this will not; if no data — return null
React.createClass({