Skip to content

Instantly share code, notes, and snippets.

# Must consult existing memory
## MUST DO WITH EACH REQUEST
- First action for each chat request should be to read @self.md and @project.md
- Last action for each chat should be to update @self.md and @project.md if needed.
## Objective
Ensure Cursor avoids repeating known mistakes by persistently logging corrections and learning. All requests must reference stored knowledge in:
- `.remember/memory/self.md` — for known mistakes and their fixes
- `.remember/memory/project.md` — for user preferences and custom rules
import dspy
from dspy.teleprompt import BootstrapFewShot
class CoT(dspy.Module):
def __init__(self):
super().__init__()
self.prog = dspy.ChainOfThought("question -> answer")
def forward(self, question):

tl;dr

  1. Don't run as root.
  2. For sessions, set httpOnly (and secure to true if running over SSL) when setting cookies.
  3. Use the Helmet for secure headers: https://github.com/evilpacket/helmet
  4. Enable csrf for preventing Cross-Site Request Forgery: http://expressjs.com/api.html#csrf
  5. Don't use the deprecated bodyParser() and only use multipart explicitly. To avoid multiparts vulnerability to 'temp file' bloat, use the defer property and pipe() the multipart upload stream to the intended destination.
@miguelramosfdz
miguelramosfdz / puppeteer-tor.js
Created March 27, 2019 15:23 — forked from stephonchen/puppeteer-tor.js
puppeteer + tor + polipo
#!/usr/bin/node
// use puppeteer 0.12.0
// since puppeteer has problems in socks5
// use polipo as a http proxy, which parent proxy is tor (localhost:9050)
var time = require('time');
var sleep = require('sleep');
const random_max = 10;
const puppeteer = require('puppeteer');
const firebase = require('firebase');
if(!firebase.apps.length) {
let config = {
apiKey: "xxxxxxxxxxxxxxxxxxxxx",
authDomain: "xxxxxxxxxxxxxxxxxxxxxxxx",
databaseURL: "xxxxxxxxxxxxxxxxxxxxx",
projectId: "xxxxxxxxx",
storageBucket: "xxxxxxxxxxxxxxxxxxxx",
@miguelramosfdz
miguelramosfdz / sketch-never-ending.md
Created August 25, 2017 14:16 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@miguelramosfdz
miguelramosfdz / topkeywords.js
Created December 16, 2015 05:57 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;
<br /><br />
# React Native: Animated
ReactEurope 2015, Paris - Spencer Ahrens - Facebook
<br /><br />
## Fluid Interactions
- People expect smooth, delightful experiences
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)