Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.is
| There are two prompts, that chain together. The first prompt does most of the work, and the second prompt organizes the sections. I found because of the nature of how LLMs write, I couldn't get just one prompt to never jump back and forth in topics. | |
| Prompt 1, which takes as input a raw transcript and generates a structured-text version... | |
| """# Instructions | |
| A transcript is provided below of a voice memo I recorded as a "note to self". please extract all the points made or thoughts described, and put them in bullet-point form. use nested bullet points to indicate structure, e.g. a top-level bullet for each topic area and sub-bullets underneath. use multi-level nesting as appropriate to organize the thinking logically. use markdown formatting with `*` instead of `-` for bullet points. | |
| DO NOT OMIT ANY POINTS MADE. This is not a summarization task — your only goal is to structure the thoughts there so they are logically organized and easy to read. Be concise because the reader is busy, but again DO NOT omit any |
| import { useState, useEffect } from "react"; | |
| import http from "./utils/http"; | |
| //the function to call the push server: https://github.com/Spyna/push-notification-demo/blob/master/front-end-react/src/utils/http.js | |
| import { | |
| isPushNotificationSupported, | |
| askUserPermission, | |
| registerServiceWorker, | |
| createNotificationSubscription, | |
| getUserSubscription |
| diff --git a/old.sol b/new.sol | |
| index 0184107..1419bcd 100644 | |
| --- a/old.sol | |
| +++ b/new.sol | |
| @@ -1,16 +1,35 @@ | |
| pragma solidity ^0.4.18; | |
| - | |
| +contract KittyCoreInterface { | |
| + function cooAddress() public returns(address); |
I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.
Here is what I had messed up, which you also probably did:
- I had too many different python interpreters
- Too many different symlinks which I lost track of
- almost no package I installed with pip worked without a headache
- any attempt to fix using online resources made it worse.
| #[macro_export] | |
| macro_rules! struct_builder { | |
| ( | |
| $( | |
| $struct_id:ident; public - [$($var:ident : $var_type:ty), *]; private - [$($pri_var:ident : $pri_var_type:ty), *]; | |
| ),* | |
| ) => ( | |
| $( | |
| pub struct $struct_id { | |
| $( |
Vanilla Debounce esnextbin
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.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).