Skip to content

Instantly share code, notes, and snippets.

View danieldunderfelt's full-sized avatar

Daniel Dunderfelt danieldunderfelt

View GitHub Profile
@ScriptedAlchemy
ScriptedAlchemy / CursorTools.json
Created January 31, 2025 03:54
Reverse Engineering cursor prompts
{
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.",
"parameters": {
"type": "object",
"properties": {
@cawfree
cawfree / react-native-macos-catalyst.md
Last active July 17, 2023 10:09
How to use React Native and MacOS Catalyst

Follow these steps to run your React Native application using MacOS Catalyst.

  1. Use the following package versions:
+ "metro-react-native-babel-preset": "^0.59.0",
+ "react-native": "0.63.0",
+ "react-native-macos": "^0.63.23",
@kitten
kitten / reactiveconf-sc-cfp.md
Last active November 17, 2020 15:06
ReactiveConf 2017 Lightning Talk CFP: With styled-components into the future

styled-components Logo

With styled-components into the future

Preprocessing is dead, long live preprocessing!


This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf

@danieldunderfelt
danieldunderfelt / historyrouter.js
Created May 5, 2017 06:41
A router based on hashrouter that uses the history api where available.
/**
This router depends on the history package:
yarn add history
Simple router for switching between routes. Based on
[hashrouter.js](https://gist.github.com/danieldunderfelt/4d016333a947764c1a5687d26d48ca27)
Suitable for MobX/Redux architecture and especially
handy for tabs, which is the reason why it exists.
@danieldunderfelt
danieldunderfelt / hashrouter.js
Created March 1, 2017 20:24
Simple hash router
/**
* Simple router for switching between hash stings.
* Suitable for MobX/Redux architecture and especially
* handy for tabs, which is the reason why it exists.
const state = { currentTab: 'lions' }
function activateTab(tabName) {
// Dispatch state change
state.currentTab = tabName

This is a proposal for a lightning talk at the Reactive 2016 conference. If you like this, star the Gist.


Thinking metrics on React applications

In regular websites, it is common to send multiple events to track user clicks. Single Page Applications change the way you look at metrics. This is a talk about a simple pattern we created at Globo.com to manage a metrics layer for http://globoplay.globo.com. The talk will cover how to track user flow using Google Analytics and other services. We solved the challenge of tying metrics and components, keeping information across pages and having global data. Also some React, React Router and React Side Effects concepts like context, higher order components, history state will be covered.

@nikgraf
nikgraf / reactive-2016.md
Last active August 5, 2021 15:31
Proposal for lightning talk at Reactive Conf 2016

Rich text editing with DraftJS Plugins

Earlier this year Facebook open sourced its React based rich text editing framework Draft.js. At Facebook it powers status updates, comments & notes. Others used it to build editors matching Medium’s experience.

Together with a whole team of open source contributors I built a plugin architecture on top of Draft.js. In this talk I walk you through the existing plugins and show how you can build your own feature-rich text editor for the web with only a handful lines of code. 🤓

Draft JS Plugins Logo

React is the new Lego - how we deal with a lot of components

Lightning talk proposal for ReactiveConf 2016

BlueKit usage

At Blueberry, we've been frustrated with maintaining and getting oriented in our React components and their props. That's why we made a tool for automatically generating a component library from a project's components.

We named it BlueKit and released it as open-source.

@doug-wade
doug-wade / reactive-conf-talk-proposal.md
Created August 13, 2016 19:35
reactive conf talk proposal

React is an amazing library for client-side user interface, and it has the added benefit of being able to be rendered on the server, which is crucial for SEO, SEM, and user experience. However, server-side rendering in practice is significantly more complicated than just calling ReactDOMServer.renderToString and piping out the result, especially if you want to make sure your site loads quickly in a mobile-first world. React Server smoothes out the common problems you run into with React server-side rendering, encodes performance best practices into the framework, and makes it easy to build high performance websites by default.

I'll discuss some of the design decisions we made during development, show our performance improvements, talk about lessons we've learned running React Server in production for a year and a half, and give some hints about the future of React Server, including adding streaming to React core.

Proposal for lightning talk at Reactive Conference.

===

Use case for react-native-macos

React Native for macOS (a.k.a React Native Desktop) started as an experiment a year ago, just out of curiousity and the active stage of development also took place during the previous Reactive conference right in the hotel room in Bratislava.

5 minutes talk about why you probably haven't heard about any real desktop application based on RN, and for what kind of applications it might be perfect fit.